public class StoreDirectAbstract implements Store
Common utils for StoreDirect, StoreWAL and StoreCached
ConcurrencyAware.DefaultImpls
Constructor and Description |
---|
StoreDirectAbstract(java.lang.String file,
VolumeFactory volumeFactory,
boolean isThreadSafe,
int concShift,
boolean fileDeleteAfterClose,
boolean checksum,
boolean checksumHeader,
boolean checksumHeaderBypass)
Common utils for StoreDirect, StoreWAL and StoreCached
|
Modifier and Type | Method and Description |
---|---|
long |
allocateData(int size,
boolean recursive) |
long |
allocateNewIndexPage() |
long |
allocateNewPage() |
long |
allocateRecid() |
void |
assertNotClosed() |
long |
calculateChecksum() |
int |
calculateHeaderChecksum() |
void |
checkThreadSafe()
checks all subcomponents, if this component is really thread safe, and throws an exception if not thread safe
|
<R> R |
deserialize(Serializer<R> serializer,
DataInput2 di,
long size) |
void |
fileHeaderCheck() |
long |
fileHeaderCompose() |
void |
freeSizeIncrement(long increment) |
boolean |
getChecksum() |
boolean |
getChecksumHeader() |
boolean |
getChecksumHeaderBypass() |
java.util.concurrent.atomic.AtomicBoolean |
getClosed() |
int |
getConcShift() |
long |
getDataTail()
end of last record
|
java.lang.String |
getFile() |
boolean |
getFileDeleteAfterClose() |
long |
getFileTail$module()
end of file (last allocated page)
|
Volume |
getHeadVol() |
NonExistentClass |
getIndexPages() |
long |
getIndexVal(long recid) |
java.util.concurrent.locks.ReadWriteLock[] |
getLocks() |
long |
getMaxRecid()
maximal allocated recid
|
int |
getSegmentCount() |
long |
getSegmentMask() |
java.util.concurrent.locks.Lock |
getStructuralLock() |
Volume |
getVolume() |
boolean |
getVolumeExistsAtStart() |
VolumeFactory |
getVolumeFactory() |
long |
indexValCompose(long size,
long offset,
int linked,
int unused,
int archive) |
boolean |
indexValFlagArchive(long indexValue) |
boolean |
indexValFlagLinked(long indexValue) |
boolean |
indexValFlagUnused(long indexValue) |
boolean |
isClosed() |
boolean |
isThreadSafe()
returns true if this is configured to be thread safe
|
void |
loadIndexPages(NonExistentClass indexPages) |
long |
longStackMasterLinkOffset(long size) |
void |
longStackPut(long masterLinkOffset,
long value,
boolean recursive) |
long |
longStackTake(long masterLinkOffset,
boolean recursive) |
long |
recidToOffset(long recid2) |
int |
recidToSegment(long recid) |
void |
releaseData(long size,
long offset,
boolean recursive) |
void |
releaseRecid(long recid) |
<R> DataOutput2 |
serialize(R record,
Serializer<R> serializer) |
void |
setDataTail(long v)
end of last record
|
void |
setFileTail$module(long v)
end of file (last allocated page)
|
void |
setIndexVal(long recid,
long value) |
void |
setMaxRecid(long v)
maximal allocated recid
|
int |
storeHeaderCompose() |
close, commit, compact, compareAndSwap, delete, fileLoad, isClosed, isReadOnly, preallocate, put, update, verify
get, getAllFiles, getAllRecids
verify
checkThreadSafe, isThreadSafe
public StoreDirectAbstract(java.lang.String file, VolumeFactory volumeFactory, boolean isThreadSafe, int concShift, boolean fileDeleteAfterClose, boolean checksum, boolean checksumHeader, boolean checksumHeaderBypass)
Common utils for StoreDirect, StoreWAL and StoreCached
isThreadSafe
- returns true if this is configured to be thread safepublic Volume getVolume()
public Volume getHeadVol()
public int getSegmentCount()
public long getSegmentMask()
public java.util.concurrent.locks.ReadWriteLock[] getLocks()
public java.util.concurrent.locks.Lock getStructuralLock()
public boolean getVolumeExistsAtStart()
public NonExistentClass getIndexPages()
public long recidToOffset(long recid2)
public java.util.concurrent.atomic.AtomicBoolean getClosed()
public boolean isClosed()
public void assertNotClosed()
public long getDataTail()
end of last record
public void setDataTail(long v)
end of last record
public long getMaxRecid()
maximal allocated recid
public void setMaxRecid(long v)
maximal allocated recid
public long getFileTail$module()
end of file (last allocated page)
public void setFileTail$module(long v)
end of file (last allocated page)
public void fileHeaderCheck()
public long fileHeaderCompose()
public int storeHeaderCompose()
public long getIndexVal(long recid)
public void setIndexVal(long recid, long value)
public void loadIndexPages(NonExistentClass indexPages)
public long indexValCompose(long size, long offset, int linked, int unused, int archive)
public boolean indexValFlagLinked(long indexValue)
public boolean indexValFlagUnused(long indexValue)
public boolean indexValFlagArchive(long indexValue)
public int recidToSegment(long recid)
public <R> R deserialize(Serializer<R> serializer, DataInput2 di, long size)
public <R> DataOutput2 serialize(R record, Serializer<R> serializer)
public long allocateRecid()
public long allocateNewIndexPage()
public long allocateData(int size, boolean recursive)
public void releaseData(long size, long offset, boolean recursive)
public void releaseRecid(long recid)
public void freeSizeIncrement(long increment)
public void longStackPut(long masterLinkOffset, long value, boolean recursive)
public long longStackTake(long masterLinkOffset, boolean recursive)
public long longStackMasterLinkOffset(long size)
public long allocateNewPage()
public long calculateChecksum()
public int calculateHeaderChecksum()
public java.lang.String getFile()
public VolumeFactory getVolumeFactory()
public boolean isThreadSafe()
returns true if this is configured to be thread safe
public int getConcShift()
public boolean getFileDeleteAfterClose()
public boolean getChecksum()
public boolean getChecksumHeader()
public boolean getChecksumHeaderBypass()
public void checkThreadSafe()
checks all subcomponents, if this component is really thread safe, and throws an exception if not thread safe