/** * Returns the index from the local cache, opening it if necessary. * * @return null if not found */ private Index getIndex(Transaction txn, long indexId) throws IOException { LHashTable.ObjEntry<SoftReference<Index>> entry = mIndexes.get(indexId); if (entry != null) { Index ix = entry.value.get(); if (ix != null) { return ix; } } return openIndex(txn, indexId, entry); }
/** * Returns the index from the local cache, opening it if necessary. * * @return null if not found */ private Index getIndex(Transaction txn, long indexId) throws IOException { LHashTable.ObjEntry<SoftReference<Index>> entry = mIndexes.get(indexId); if (entry != null) { Index ix = entry.value.get(); if (ix != null) { return ix; } } return openIndex(txn, indexId, entry); }
/** * Returns the index from the local cache, opening it if necessary. * * @return null if not found */ private Index getIndex(Transaction txn, long indexId) throws IOException { LHashTable.ObjEntry<SoftReference<Index>> entry = mIndexes.get(indexId); if (entry != null) { Index ix = entry.value.get(); if (ix != null) { return ix; } } return openIndex(txn, indexId, entry); }
@Override public boolean cursorValueClear(long cursorId, long txnId, long pos, long length) throws IOException { LHashTable.ObjEntry<TreeCursor> entry = mCursors.get(cursorId); if (entry != null) { LocalTransaction txn = txn(txnId); if (txn != null) { readyCursorValueOp(entry, txn).valueClear(pos, length); } } return true; }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
@Override public boolean cursorValueClear(long cursorId, long txnId, long pos, long length) throws IOException { LHashTable.ObjEntry<_TreeCursor> entry = mCursors.get(cursorId); if (entry != null) { _LocalTransaction txn = txn(txnId); if (txn != null) { readyCursorValueOp(entry, txn).valueClear(pos, length); } } return true; }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
public V getValue(long key) { ObjEntry<V> entry = get(key); return entry == null ? null : entry.value; }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
private Index openIndex(long indexId) throws IOException { LHashTable.ObjEntry<Index> entry = mIndexes.get(indexId); if (entry != null) { return entry.value; } Index ix = mDatabase.anyIndexById(indexId); if (ix != null) { // Maintain a strong reference to the index. mIndexes.insert(indexId).value = ix; } return ix; } }
public V getValue(long key) { ObjEntry<V> entry = get(key); return entry == null ? null : entry.value; }
public V getValue(long key) { ObjEntry<V> entry = get(key); return entry == null ? null : entry.value; }
/** * @return null if index is not open */ private Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }
/** * @return null if index is not open */ private _Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<_TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }
/** * @return null if index is not open */ private Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }
/** * @return null if index is not open */ private _Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<_TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }
/** * @return null if index is not open */ private _Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<_TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }
/** * @return null if index is not open */ private Tree lookupIndexById(long id) { mOpenTreesLatch.acquireShared(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(id); return entry == null ? null : entry.value.get(); } finally { mOpenTreesLatch.releaseShared(); } }