public final class ContentHashEnumerator extends PersistentBTreeEnumerator<byte[]>
PersistentEnumeratorBase.CorruptedException, PersistentEnumeratorBase.DataFilter, PersistentEnumeratorBase.RecordsProcessor, PersistentEnumeratorBase.Version, PersistentEnumeratorBase.VersionUpdatedException
VERSION
LOG, myFile, myStorage, NULL_ID
Constructor and Description |
---|
ContentHashEnumerator(java.nio.file.Path contentsHashesFile) |
ContentHashEnumerator(java.nio.file.Path contentsHashesFile,
PagedFileStorage.StorageLockContext storageLockContext) |
Modifier and Type | Method and Description |
---|---|
protected int |
doWriteData(byte[] value) |
int |
enumerate(byte[] value) |
int |
getLargestId() |
static int |
getVersion() |
boolean |
hasHashFor(byte[] value) |
protected boolean |
isKeyAtIndex(byte[] value,
int idx) |
byte[] |
valueOf(int idx) |
addrToIndex, doClose, doFlush, enumerateImpl, getValue, indexToAddr, processAllDataObject, setRecordHandler, setupEmptyFile, setupValueId, traverseAllRecords
clearCacheForTests, close, force, getAllDataObjects, getMetaData, isClosed, isCorrupted, isDirty, iterateData, markCorrupted, markDirty, putMetaData, tryEnumerate, writeData
public ContentHashEnumerator(java.nio.file.Path contentsHashesFile) throws java.io.IOException
java.io.IOException
public ContentHashEnumerator(java.nio.file.Path contentsHashesFile, PagedFileStorage.StorageLockContext storageLockContext) throws java.io.IOException
java.io.IOException
public boolean hasHashFor(byte[] value) throws java.io.IOException
java.io.IOException
public int enumerate(byte[] value) throws java.io.IOException
enumerate
in interface DataEnumerator<byte[]>
enumerate
in class PersistentEnumeratorBase<byte[]>
java.io.IOException
protected int doWriteData(byte[] value) throws java.io.IOException
doWriteData
in class PersistentEnumeratorBase<byte[]>
java.io.IOException
public int getLargestId()
getLargestId
in class PersistentEnumeratorBase<byte[]>
protected boolean isKeyAtIndex(byte[] value, int idx) throws java.io.IOException
isKeyAtIndex
in class PersistentEnumeratorBase<byte[]>
java.io.IOException
public byte[] valueOf(int idx) throws java.io.IOException
valueOf
in interface DataEnumerator<byte[]>
valueOf
in class PersistentBTreeEnumerator<byte[]>
java.io.IOException
public static int getVersion()