public class StoreDirect extends StoreDirectAbstract implements StoreBinary
Store which uses binary storage (file, memory buffer...) and updates records on place. It has memory allocator, so it reuses space freed by deletes and updates.
Modifier and Type | Class and Description |
---|---|
static class |
StoreDirect.Companion |
ConcurrencyAware.DefaultImpls
Modifier and Type | Field and Description |
---|---|
static StoreDirect.Companion |
Companion |
Constructor and Description |
---|
StoreDirect(java.lang.String file,
VolumeFactory volumeFactory,
boolean isReadOnly,
long fileLockWait,
boolean isThreadSafe,
int concShift,
long allocateIncrement,
long allocateStartSize,
boolean fileDeleteAfterClose,
boolean fileDeleteAfterOpen,
boolean checksum,
boolean checksumHeader,
boolean checksumHeaderBypass)
Store which uses binary storage (file, memory buffer...) and updates records on place.
It has memory allocator, so it reuses space freed by deletes and updates.
|
Modifier and Type | Method and Description |
---|---|
long |
allocateNewIndexPage() |
long |
allocateNewPage() |
long |
calculateFreeSize() |
void |
close() |
void |
commit() |
void |
compact() |
<R> boolean |
compareAndSwap(long recid,
R expectedOldRecord,
R newRecord,
Serializer<R> serializer) |
<R> void |
delete(long recid,
Serializer<R> serializer) |
boolean |
fileLoad() |
void |
freeSizeIncrement(long increment) |
<R> R |
get(long recid,
Serializer<R> serializer) |
java.lang.Iterable<java.lang.String> |
getAllFiles() |
LongIterator |
getAllRecids() |
long |
getBinaryLong(long recid,
StoreBinaryGetLong f) |
java.util.concurrent.atomic.AtomicLong |
getFreeSize() |
long |
getFreeSize() |
Volume |
getHeadVol() |
long |
getIndexVal(long recid) |
long |
getTotalSize() |
Volume |
getVolume() |
boolean |
isReadOnly() |
void |
linkedRecordDelete(long indexValue) |
byte[] |
linkedRecordGet(long indexValue) |
long |
linkedRecordPut(byte[] output,
int size) |
long |
longStackFindEnd(long pageOffset,
long pos) |
void |
longStackForEach(long masterLinkOffset,
Function1<? super java.lang.Long,Unit> body) |
void |
longStackNewChunk(long masterLinkOffset,
long prevPageOffset,
long value,
long valueSize,
boolean recursive) |
void |
longStackPut(long masterLinkOffset,
long value,
boolean recursive) |
long |
longStackTake(long masterLinkOffset,
boolean recursive) |
long |
preallocate() |
<R> long |
put(R record,
Serializer<R> serializer) |
void |
setIndexVal(long recid,
long value) |
<R> void |
update(long recid,
R record,
Serializer<R> serializer) |
void |
verify() |
allocateData, allocateNewIndexPage, allocateNewPage, allocateRecid, assertNotClosed, calculateChecksum, calculateHeaderChecksum, checkThreadSafe, deserialize, fileHeaderCheck, fileHeaderCompose, freeSizeIncrement, getChecksum, getChecksumHeader, getChecksumHeaderBypass, getClosed, getConcShift, getDataTail, getFile, getFileDeleteAfterClose, getFileTail$module, getHeadVol, getIndexPages, getIndexVal, getLocks, getMaxRecid, getSegmentCount, getSegmentMask, getStructuralLock, getVolume, getVolumeExistsAtStart, getVolumeFactory, indexValCompose, indexValFlagArchive, indexValFlagLinked, indexValFlagUnused, isClosed, isThreadSafe, loadIndexPages, longStackMasterLinkOffset, longStackPut, longStackTake, recidToOffset, recidToSegment, releaseData, releaseRecid, serialize, setDataTail, setFileTail$module, setIndexVal, setMaxRecid, storeHeaderCompose
getBinaryLong
close, commit, compact, compareAndSwap, delete, fileLoad, isClosed, isReadOnly, preallocate, put, update, verify
get, getAllFiles, getAllRecids
verify
checkThreadSafe, isThreadSafe
public static StoreDirect.Companion Companion
public StoreDirect(java.lang.String file, VolumeFactory volumeFactory, boolean isReadOnly, long fileLockWait, boolean isThreadSafe, int concShift, long allocateIncrement, long allocateStartSize, boolean fileDeleteAfterClose, boolean fileDeleteAfterOpen, boolean checksum, boolean checksumHeader, boolean checksumHeaderBypass)
Store which uses binary storage (file, memory buffer...) and updates records on place. It has memory allocator, so it reuses space freed by deletes and updates.
public java.util.concurrent.atomic.AtomicLong getFreeSize()
public Volume getVolume()
public Volume getHeadVol()
public long getIndexVal(long recid)
public void setIndexVal(long recid, long value)
public long allocateNewPage()
public long allocateNewIndexPage()
public byte[] linkedRecordGet(long indexValue)
public void linkedRecordDelete(long indexValue)
public long linkedRecordPut(byte[] output, int size)
public void longStackPut(long masterLinkOffset, long value, boolean recursive)
public void longStackNewChunk(long masterLinkOffset, long prevPageOffset, long value, long valueSize, boolean recursive)
public long longStackTake(long masterLinkOffset, boolean recursive)
public long longStackFindEnd(long pageOffset, long pos)
public void longStackForEach(long masterLinkOffset, Function1<? super java.lang.Long,Unit> body)
public long preallocate()
public <R> R get(long recid, Serializer<R> serializer)
public long getBinaryLong(long recid, StoreBinaryGetLong f)
public <R> long put(R record, Serializer<R> serializer)
public <R> void update(long recid, R record, Serializer<R> serializer)
public <R> boolean compareAndSwap(long recid, R expectedOldRecord, R newRecord, Serializer<R> serializer)
public <R> void delete(long recid, Serializer<R> serializer)
public void compact()
public void commit()
public void close()
public LongIterator getAllRecids()
public void verify()
public void freeSizeIncrement(long increment)
public long getFreeSize()
public long calculateFreeSize()
public long getTotalSize()
public boolean fileLoad()
public java.lang.Iterable<java.lang.String> getAllFiles()
public boolean isReadOnly()