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.ByteOrder byteOrder  
    protected static int MAX_FILE_SIZE  
    protected static int MIN_FILE_SIZE  
  • Constructor Summary

    Constructors
    Constructor Description
    AbstractResizingAtomicStore​(java.io.File path, java.lang.String name)  
  • Method Summary

    Modifier and Type Method Description
    void close()  
    void drop()  
    protected void ensureCapacity​(int id, int byteLength)  
    protected void ensureCapacity​(long size)  
    protected long findNextBlockPosition​(long position, int blockSize)  
    void flush()  
    protected org.agrona.concurrent.AtomicBuffer getBuffer​(int index)  
    protected int getBufferIndex​(long position)  
    protected org.agrona.concurrent.AtomicBuffer[] getBuffers()  
    protected int getMaximumId​(int byteLength)  
    java.lang.String getName()  
    protected int getOffset​(int id, int bufferIndex, int entriesPerFile, int byteLength)  
    protected int getOffset​(long position, int bufferIndex)  
    java.io.File getPath()  
    long getTotalCapacity()  
    java.lang.String toString()  

    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:
      toString in class java.lang.Object