@Test public void reproCON_516() { Engine engine = (Engine) store; Buffer buffer = (Buffer) engine.buffer; int count = 0; while (!(boolean) Reflection.call(buffer, "canTransport")) { add("name", Convert.javaToThrift("Jeff"), Time.now()); count++; } buffer.transport(engine.destination); add("name", Convert.javaToThrift("Jeff"), Time.now()); count++; Set<Long> matches = engine.find("name", Operator.EQUALS, Convert.javaToThrift("jeff")); Assert.assertEquals(count, matches.size()); }
@Override public boolean add(String key, TObject value, long record) { Token sharedToken = Token.shareable(record); Token writeToken = Token.wrap(key, record); RangeToken rangeToken = RangeToken.forWriting(Text.wrap(key), Value.wrap(value)); Lock shared = lockService.getWriteLock(sharedToken); Lock write = lockService.getWriteLock(writeToken); Lock range = rangeLockService.getWriteLock(rangeToken); shared.lock(); write.lock(); range.lock(); try { return addUnsafe(key, value, record, true, sharedToken, writeToken, rangeToken); } finally { shared.unlock(); write.unlock(); range.unlock(); } }
Engine extends BufferedStore implements
        TransactionSupport,
        AtomicSupport,
        InventoryTracker { @Override public boolean add(String key, TObject value, long record) { Token sharedToken = Token.shareable(record); Token writeToken = Token.wrap(key, record); RangeToken rangeToken = RangeToken.forWriting(Text.wrap(key), Value.wrap(value)); Lock shared = lockService.getWriteLock(sharedToken); Lock write = lockService.getWriteLock(writeToken); Lock range = rangeLockService.getWriteLock(rangeToken); shared.lock(); write.lock(); range.lock(); try { return addUnsafe(key, value, record, true, sharedToken, writeToken, rangeToken); } finally { shared.unlock(); write.unlock(); range.unlock(); } } }
Engine extends BufferedStore implements
        TransactionSupport,
        AtomicSupport,
        InventoryTracker { @Override public boolean add(String key, TObject value, long record) { Token sharedToken = Token.shareable(record); Token writeToken = Token.wrap(key, record); RangeToken rangeToken = RangeToken.forWriting(Text.wrap(key), Value.wrap(value)); Lock shared = lockService.getWriteLock(sharedToken); Lock write = lockService.getWriteLock(writeToken); Lock range = rangeLockService.getWriteLock(rangeToken); shared.lock(); write.lock(); range.lock(); try { return addUnsafe(key, value, record, true, sharedToken, writeToken, rangeToken); } finally { shared.unlock(); write.unlock(); range.unlock(); } } Engine();  Engine(String bufferStore, String dbStore);  Engine(String bufferStore, String dbStore, String environment); @Authorized private  Engine(Buffer buffer, Database database, String environment); }
Engine extends BufferedStore implements
        TransactionSupport,
        AtomicSupport,
        InventoryTracker { @Override public boolean add(String key, TObject value, long record) { Token sharedToken = Token.shareable(record); Token writeToken = Token.wrap(key, record); RangeToken rangeToken = RangeToken.forWriting(Text.wrap(key), Value.wrap(value)); Lock shared = lockService.getWriteLock(sharedToken); Lock write = lockService.getWriteLock(writeToken); Lock range = rangeLockService.getWriteLock(rangeToken); shared.lock(); write.lock(); range.lock(); try { return addUnsafe(key, value, record, true, sharedToken, writeToken, rangeToken); } finally { shared.unlock(); write.unlock(); range.unlock(); } } Engine();  Engine(String bufferStore, String dbStore);  Engine(String bufferStore, String dbStore, String environment); @Authorized private  Engine(Buffer buffer, Database database, String environment); @Override @DoNotInvoke void accept(Write write); @Override @DoNotInvoke void accept(Write write, boolean sync); @Override boolean add(String key, TObject value, long record); @Override @Restricted void addVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Map<Long, String> audit(long record); @Override Map<Long, String> audit(String key, long record); @Override Map<Long, String> auditUnsafe(long record); @Override Map<Long, String> auditUnsafe(String key, long record); @Override Map<TObject, Set<Long>> browse(String key); @Override Map<TObject, Set<Long>> browse(String key, long timestamp); @Override Map<String, Set<TObject>> browseUnsafe(long record); @Override Map<TObject, Set<Long>> browseUnsafe(String key); @Override Map<Long, Set<TObject>> chronologize(String key, long record,
            long start, long end); @Override Map<Long, Set<TObject>> chronologizeUnsafe(String key, long record,
            long start, long end); @Override boolean contains(long record); @Override Map<Long, Set<TObject>> doExploreUnsafe(String key,
            Operator operator, TObject... values); @ManagedOperation String dump(String id); @Override Set<TObject> gather(String key, long record); @Override Set<TObject> gather(String key, long record, long timestamp); @Override Set<TObject> gatherUnsafe(String key, long record); @Override Set<Long> getAllRecords(); @ManagedOperation String getDumpList(); @Override Inventory getInventory(); @Override @Restricted void notifyVersionChange(Token token); @Override boolean remove(String key, TObject value, long record); @Override @Restricted void removeVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Set<Long> search(String key, String query); @Override Map<String, Set<TObject>> select(long record); @Override Map<String, Set<TObject>> select(long record, long timestamp); @Override Set<TObject> select(String key, long record); @Override Set<TObject> select(String key, long record, long timestamp); @Override Set<TObject> selectUnsafe(String key, long record); @Override void set(String key, TObject value, long record); @Override void start(); @Override AtomicOperation startAtomicOperation(); @Override Transaction startTransaction(); @Override void stop(); @Override void sync(); @Override boolean verify(String key, TObject value, long record); @Override boolean verify(String key, TObject value, long record,
            long timestamp); @Override boolean verifyUnsafe(String key, TObject value, long record); }
Engine extends BufferedStore implements
        TransactionSupport,
        AtomicSupport,
        InventoryTracker { @Override public boolean add(String key, TObject value, long record) { Token sharedToken = Token.shareable(record); Token writeToken = Token.wrap(key, record); RangeToken rangeToken = RangeToken.forWriting(Text.wrap(key), Value.wrap(value)); Lock shared = lockService.getWriteLock(sharedToken); Lock write = lockService.getWriteLock(writeToken); Lock range = rangeLockService.getWriteLock(rangeToken); shared.lock(); write.lock(); range.lock(); try { return addUnsafe(key, value, record, true, sharedToken, writeToken, rangeToken); } finally { shared.unlock(); write.unlock(); range.unlock(); } } Engine();  Engine(String bufferStore, String dbStore);  Engine(String bufferStore, String dbStore, String environment); @Authorized private  Engine(Buffer buffer, Database database, String environment); @Override @DoNotInvoke void accept(Write write); @Override @DoNotInvoke void accept(Write write, boolean sync); @Override boolean add(String key, TObject value, long record); @Override @Restricted void addVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Map<Long, String> audit(long record); @Override Map<Long, String> audit(String key, long record); @Override Map<Long, String> auditUnsafe(long record); @Override Map<Long, String> auditUnsafe(String key, long record); @Override Map<TObject, Set<Long>> browse(String key); @Override Map<TObject, Set<Long>> browse(String key, long timestamp); @Override Map<String, Set<TObject>> browseUnsafe(long record); @Override Map<TObject, Set<Long>> browseUnsafe(String key); @Override Map<Long, Set<TObject>> chronologize(String key, long record,
            long start, long end); @Override Map<Long, Set<TObject>> chronologizeUnsafe(String key, long record,
            long start, long end); @Override boolean contains(long record); @Override Map<Long, Set<TObject>> doExploreUnsafe(String key,
            Operator operator, TObject... values); @ManagedOperation String dump(String id); @Override Set<TObject> gather(String key, long record); @Override Set<TObject> gather(String key, long record, long timestamp); @Override Set<TObject> gatherUnsafe(String key, long record); @Override Set<Long> getAllRecords(); @ManagedOperation String getDumpList(); @Override Inventory getInventory(); @Override @Restricted void notifyVersionChange(Token token); @Override boolean remove(String key, TObject value, long record); @Override @Restricted void removeVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Set<Long> search(String key, String query); @Override Map<String, Set<TObject>> select(long record); @Override Map<String, Set<TObject>> select(long record, long timestamp); @Override Set<TObject> select(String key, long record); @Override Set<TObject> select(String key, long record, long timestamp); @Override Set<TObject> selectUnsafe(String key, long record); @Override void set(String key, TObject value, long record); @Override void start(); @Override AtomicOperation startAtomicOperation(); @Override Transaction startTransaction(); @Override void stop(); @Override void sync(); @Override boolean verify(String key, TObject value, long record); @Override boolean verify(String key, TObject value, long record,
            long timestamp); @Override boolean verifyUnsafe(String key, TObject value, long record); static final String BUFFER_DUMP_ID; }