Class AbstractResizingAtomicStore
java.lang.Object
org.teamapps.universaldb.index.buffer.AbstractResizingAtomicStore
- Direct Known Subclasses:
AbstractBlockEntryAtomicStore,PrimitiveEntryAtomicStore
public class AbstractResizingAtomicStore
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected static java.nio.ByteOrderbyteOrderprotected static intMAX_FILE_SIZEprotected static intMIN_FILE_SIZE -
Constructor Summary
Constructors Constructor Description AbstractResizingAtomicStore(java.io.File path, java.lang.String name) -
Method Summary
Modifier and Type Method Description voidclose()voiddrop()protected voidensureCapacity(int id, int byteLength)protected voidensureCapacity(long size)protected longfindNextBlockPosition(long position, int blockSize)voidflush()protected org.agrona.concurrent.AtomicBuffergetBuffer(int index)protected intgetBufferIndex(long position)protected org.agrona.concurrent.AtomicBuffer[]getBuffers()protected intgetMaximumId(int byteLength)java.lang.StringgetName()protected intgetOffset(int id, int bufferIndex, int entriesPerFile, int byteLength)protected intgetOffset(long position, int bufferIndex)java.io.FilegetPath()longgetTotalCapacity()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
byteOrder
protected static final java.nio.ByteOrder byteOrder -
MIN_FILE_SIZE
protected static final int MIN_FILE_SIZE- See Also:
- Constant Field Values
-
MAX_FILE_SIZE
protected static final int MAX_FILE_SIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractResizingAtomicStore
public AbstractResizingAtomicStore(java.io.File path, java.lang.String name)
-
-
Method Details
-
ensureCapacity
protected void ensureCapacity(int id, int byteLength) -
findNextBlockPosition
protected long findNextBlockPosition(long position, int blockSize) -
getBuffer
protected org.agrona.concurrent.AtomicBuffer getBuffer(int index) -
getBuffers
protected org.agrona.concurrent.AtomicBuffer[] getBuffers() -
getBufferIndex
protected int getBufferIndex(long position) -
getOffset
protected int getOffset(long position, int bufferIndex) -
getOffset
protected int getOffset(int id, int bufferIndex, int entriesPerFile, int byteLength) -
getMaximumId
protected int getMaximumId(int byteLength) -
ensureCapacity
protected void ensureCapacity(long size) -
getPath
public java.io.File getPath() -
getName
public java.lang.String getName() -
getTotalCapacity
public long getTotalCapacity() -
flush
public void flush() -
close
public void close() -
drop
public void drop() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-