public class PersistentBTreeEnumerator<Data> extends PersistentEnumeratorBase<Data>
PersistentEnumeratorBase.CorruptedException, PersistentEnumeratorBase.DataFilter, PersistentEnumeratorBase.RecordsProcessor, PersistentEnumeratorBase.Version, PersistentEnumeratorBase.VersionUpdatedException| Modifier and Type | Field and Description |
|---|---|
protected static int |
VERSION |
LOG, myFile, myStorage, NULL_ID| Constructor and Description |
|---|
PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize) |
PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize,
PagedFileStorage.StorageLockContext lockContext) |
PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize,
PagedFileStorage.StorageLockContext lockContext,
int version) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addrToIndex(int addr) |
protected void |
doClose() |
protected void |
doFlush() |
protected int |
enumerateImpl(Data value,
boolean onlyCheckForExisting,
boolean saveNewValue) |
Data |
getValue(int keyId,
int processingKey) |
protected int |
indexToAddr(int idx) |
boolean |
processAllDataObject(Processor<? super Data> processor,
PersistentEnumeratorBase.DataFilter filter) |
void |
setRecordHandler(com.intellij.util.io.PersistentEnumeratorBase.RecordBufferHandler<PersistentEnumeratorBase> recordHandler) |
protected void |
setupEmptyFile() |
protected int |
setupValueId(int hashCode,
int dataOff) |
boolean |
traverseAllRecords(PersistentEnumeratorBase.RecordsProcessor p) |
Data |
valueOf(int idx) |
clearCacheForTests, close, doWriteData, enumerate, force, getAllDataObjects, getLargestId, getMetaData, isClosed, isCorrupted, isDirty, isKeyAtIndex, iterateData, markCorrupted, markDirty, putMetaData, tryEnumerate, writeDatapublic PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize)
throws java.io.IOException
java.io.IOExceptionpublic PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize,
PagedFileStorage.StorageLockContext lockContext)
throws java.io.IOException
java.io.IOExceptionpublic PersistentBTreeEnumerator(java.nio.file.Path file,
KeyDescriptor<Data> dataDescriptor,
int initialSize,
PagedFileStorage.StorageLockContext lockContext,
int version)
throws java.io.IOException
java.io.IOExceptionprotected void setupEmptyFile()
throws java.io.IOException
setupEmptyFile in class PersistentEnumeratorBase<Data>java.io.IOExceptionprotected void doClose()
throws java.io.IOException
doClose in class PersistentEnumeratorBase<Data>java.io.IOExceptionpublic boolean processAllDataObject(Processor<? super Data> processor, PersistentEnumeratorBase.DataFilter filter) throws java.io.IOException
processAllDataObject in class PersistentEnumeratorBase<Data>java.io.IOExceptionpublic boolean traverseAllRecords(PersistentEnumeratorBase.RecordsProcessor p) throws java.io.IOException
traverseAllRecords in class PersistentEnumeratorBase<Data>java.io.IOExceptionprotected int addrToIndex(int addr)
protected int indexToAddr(int idx)
indexToAddr in class PersistentEnumeratorBase<Data>protected int setupValueId(int hashCode,
int dataOff)
setupValueId in class PersistentEnumeratorBase<Data>public void setRecordHandler(com.intellij.util.io.PersistentEnumeratorBase.RecordBufferHandler<PersistentEnumeratorBase> recordHandler)
setRecordHandler in class PersistentEnumeratorBase<Data>public Data getValue(int keyId, int processingKey) throws java.io.IOException
getValue in class PersistentEnumeratorBase<Data>java.io.IOExceptionprotected int enumerateImpl(Data value, boolean onlyCheckForExisting, boolean saveNewValue) throws java.io.IOException
enumerateImpl in class PersistentEnumeratorBase<Data>java.io.IOExceptionpublic Data valueOf(int idx) throws java.io.IOException
valueOf in interface DataEnumerator<Data>valueOf in class PersistentEnumeratorBase<Data>java.io.IOExceptionprotected void doFlush()
throws java.io.IOException
doFlush in class PersistentEnumeratorBase<Data>java.io.IOException