Пример #1
0
 /**
  * Check that a record entry exists in the entry tree.
  *
  * @param txn a non null transaction
  * @param entryID The entry ID which forms the key.
  * @return True if an entry with entryID exists
  * @throws StorageRuntimeException If an error occurs in the storage.
  */
 public boolean containsEntryID(ReadableTransaction txn, EntryID entryID) {
   checkNotNull(txn, "txn must not be null");
   checkNotNull(entryID, "entryID must not be null");
   try (final Cursor<ByteString, ByteString> cursor = txn.openCursor(getName())) {
     return cursor.positionToKey(entryID.toByteString());
   }
 }
 @Override
 public boolean positionToKey(final ByteSequence key) {
   clearCache();
   return input.positionToKey(key);
 }