Class IndexedStorageFile_v0

java.lang.Object
com.hypixel.hytale.storage.IndexedStorageFile_v0
All Implemented Interfaces:
Closeable, AutoCloseable

@Deprecated public class IndexedStorageFile_v0 extends Object implements Closeable
Deprecated.
  • Field Details

    • LOGGER

      private static final com.hypixel.hytale.logger.HytaleLogger LOGGER
      Deprecated.
    • EMPTY_STAMPED_LOCKS

      public static final StampedLock[] EMPTY_STAMPED_LOCKS
      Deprecated.
    • METRICS_REGISTRY

      public static final MetricsRegistry<IndexedStorageFile_v0> METRICS_REGISTRY
      Deprecated.
    • MAGIC_STRING

      public static final String MAGIC_STRING
      Deprecated.
      See Also:
    • VERSION

      public static final int VERSION
      Deprecated.
      See Also:
    • DEFAULT_BLOB_COUNT

      public static final int DEFAULT_BLOB_COUNT
      Deprecated.
      See Also:
    • DEFAULT_SEGMENT_SIZE

      public static final int DEFAULT_SEGMENT_SIZE
      Deprecated.
      See Also:
    • DEFAULT_COMPRESSION_LEVEL

      public static final int DEFAULT_COMPRESSION_LEVEL
      Deprecated.
      See Also:
    • DEFAULT_CONTIGUOUS_BLOBS

      public static final boolean DEFAULT_CONTIGUOUS_BLOBS
      Deprecated.
      See Also:
    • HOH

      Deprecated.
    • MAGIC_LENGTH

      public static final int MAGIC_LENGTH
      Deprecated.
      See Also:
    • MAGIC_OFFSET

      public static final int MAGIC_OFFSET
      Deprecated.
    • VERSION_OFFSET

      public static final int VERSION_OFFSET
      Deprecated.
    • BLOB_COUNT_OFFSET

      public static final int BLOB_COUNT_OFFSET
      Deprecated.
    • SEGMENT_SIZE_OFFSET

      public static final int SEGMENT_SIZE_OFFSET
      Deprecated.
    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      Deprecated.
    • SOH

      Deprecated.
    • NEXT_SEGMENT_OFFSET

      public static final int NEXT_SEGMENT_OFFSET
      Deprecated.
    • SEGMENT_HEADER_LENGTH

      public static final int SEGMENT_HEADER_LENGTH
      Deprecated.
    • BOH

      Deprecated.
    • SRC_LENGTH_OFFSET

      public static final int SRC_LENGTH_OFFSET
      Deprecated.
    • COMPRESSED_LENGTH_OFFSET

      public static final int COMPRESSED_LENGTH_OFFSET
      Deprecated.
    • BLOB_HEADER_LENGTH

      public static final int BLOB_HEADER_LENGTH
      Deprecated.
    • INDEX_SIZE

      public static final int INDEX_SIZE
      Deprecated.
      See Also:
    • UNASSIGNED_INDEX

      public static final int UNASSIGNED_INDEX
      Deprecated.
      See Also:
    • END_BLOB_INDEX

      public static final int END_BLOB_INDEX
      Deprecated.
      See Also:
    • FIRST_SEGMENT_INDEX

      public static final int FIRST_SEGMENT_INDEX
      Deprecated.
      See Also:
    • NO_ATTRIBUTES

      public static final FileAttribute<?>[] NO_ATTRIBUTES
      Deprecated.
    • MAGIC_BYTES

      static final byte[] MAGIC_BYTES
      Deprecated.
    • MAGIC_BUFFER

      private static final ByteBuffer MAGIC_BUFFER
      Deprecated.
    • CACHED_TEMP_BUFFER

      private static final ThreadLocal<ByteBuffer> CACHED_TEMP_BUFFER
      Deprecated.
    • path

      @Nonnull private final Path path
      Deprecated.
    • fileChannel

      private final FileChannel fileChannel
      Deprecated.
    • compressionLevel

      private int compressionLevel
      Deprecated.
    • contiguousBlobs

      private boolean contiguousBlobs
      Deprecated.
    • blobCount

      private int blobCount
      Deprecated.
    • segmentSize

      private int segmentSize
      Deprecated.
    • indexLocks

      private StampedLock[] indexLocks
      Deprecated.
    • mappedBlobIndexes

      @Nullable private MappedByteBuffer mappedBlobIndexes
      Deprecated.
    • segmentLocksLock

      private final StampedLock segmentLocksLock
      Deprecated.
    • segmentLocks

      private StampedLock[] segmentLocks
      Deprecated.
    • nextSegmentIndexesLock

      private final StampedLock nextSegmentIndexesLock
      Deprecated.
    • nextSegmentIndexes

      @Nonnull private int[] nextSegmentIndexes
      Deprecated.
  • Constructor Details

  • Method Details

    • getTempBuffer

      @Nonnull private static ByteBuffer getTempBuffer(int length)
      Deprecated.
    • allocateDirect

      @Nonnull private static ByteBuffer allocateDirect(int length)
      Deprecated.
    • open

      @Nonnull public static IndexedStorageFile_v0 open(@Nonnull Path path, OpenOption... options) throws IOException
      Deprecated.
      Throws:
      IOException
    • open

      @Nonnull public static IndexedStorageFile_v0 open(@Nonnull Path path, @Nonnull Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
      Deprecated.
      Throws:
      IOException
    • open

      @Nonnull public static IndexedStorageFile_v0 open(@Nonnull Path path, int blobCount, int segmentSize, OpenOption... options) throws IOException
      Deprecated.
      Throws:
      IOException
    • open

      @Nonnull public static IndexedStorageFile_v0 open(@Nonnull Path path, int blobCount, int segmentSize, @Nonnull Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
      Deprecated.
      Throws:
      IOException
    • getPath

      @Nonnull public Path getPath()
      Deprecated.
    • getBlobCount

      public int getBlobCount()
      Deprecated.
    • getSegmentSize

      public int getSegmentSize()
      Deprecated.
    • getCompressionLevel

      public int getCompressionLevel()
      Deprecated.
    • setCompressionLevel

      public void setCompressionLevel(int compressionLevel)
      Deprecated.
    • isContiguousBlobs

      public boolean isContiguousBlobs()
      Deprecated.
    • setContiguousBlobs

      public void setContiguousBlobs(boolean contiguousBlobs)
      Deprecated.
    • create

      @Nonnull protected IndexedStorageFile_v0 create(int blobCount, int segmentSize) throws IOException
      Deprecated.
      Throws:
      IOException
    • writeHeader

      protected void writeHeader(int blobCount, int segmentSize) throws IOException
      Deprecated.
      Throws:
      IOException
    • open

      @Nonnull protected IndexedStorageFile_v0 open() throws IOException
      Deprecated.
      Throws:
      IOException
    • readHeader

      protected void readHeader() throws IOException
      Deprecated.
      Throws:
      IOException
    • memoryMapBlobIndexes

      protected void memoryMapBlobIndexes() throws IOException
      Deprecated.
      Throws:
      IOException
    • readNextIndexes

      protected void readNextIndexes() throws IOException
      Deprecated.
      Throws:
      IOException
    • processTempIndexes

      protected void processTempIndexes() throws IOException
      Deprecated.
      Throws:
      IOException
    • clearSegments

      protected int clearSegments(int firstSegmentIndex, @Nonnull ByteBuffer tempIndexBuffer) throws IOException
      Deprecated.
      Throws:
      IOException
    • size

      public long size() throws IOException
      Deprecated.
      Throws:
      IOException
    • segmentSize

      public int segmentSize()
      Deprecated.
    • segmentCount

      public int segmentCount()
      Deprecated.
    • keys

      @Nonnull public it.unimi.dsi.fastutil.ints.IntList keys()
      Deprecated.
    • readBlobLength

      public int readBlobLength(int blobIndex) throws IOException
      Deprecated.
      Throws:
      IOException
    • readBlobCompressedLength

      public int readBlobCompressedLength(int blobIndex) throws IOException
      Deprecated.
      Throws:
      IOException
    • readBlob

      @Nullable public ByteBuffer readBlob(int blobIndex) throws IOException
      Deprecated.
      Throws:
      IOException
    • readBlob

      public void readBlob(int blobIndex, @Nonnull ByteBuffer dest) throws IOException
      Deprecated.
      Throws:
      IOException
    • readBlobHeader

      @Nonnull protected ByteBuffer readBlobHeader(int firstSegmentIndex) throws IOException
      Deprecated.
      Throws:
      IOException
    • readSegments

      @Nonnull protected ByteBuffer readSegments(int firstSegmentIndex, int compressedLength, @Nonnull ByteBuffer tempHeaderBuffer) throws IOException
      Deprecated.
      Throws:
      IOException
    • writeBlob

      public void writeBlob(int blobIndex, @Nonnull ByteBuffer src) throws IOException
      Deprecated.
      Throws:
      IOException
    • removeBlob

      public void removeBlob(int blobIndex) throws IOException
      Deprecated.
      Throws:
      IOException
    • writeSegments

      protected int writeSegments(int blobIndex, @Nonnull ByteBuffer data) throws IOException
      Deprecated.
      Throws:
      IOException
    • findFreeSegment

      @Nonnull private IndexedStorageFile_v0.SegmentRangeLock findFreeSegment(int count)
      Deprecated.
    • getNextIndex

      protected int getNextIndex(int segmentIndex)
      Deprecated.
    • getSegmentLock

      protected StampedLock getSegmentLock(int segmentIndex)
      Deprecated.
    • tryWriteLockSegmentRange

      @Nullable protected IndexedStorageFile_v0.SegmentRangeLock tryWriteLockSegmentRange(int start, int count)
      Deprecated.
    • indexesLength

      protected int indexesLength()
      Deprecated.
    • segmentsBase

      protected long segmentsBase()
      Deprecated.
    • segmentOffset

      protected long segmentOffset(int segmentIndex)
      Deprecated.
    • segmentPosition

      protected long segmentPosition(int segmentIndex)
      Deprecated.
    • positionToSegment

      protected int positionToSegment(long position)
      Deprecated.
    • blobHeaderPosition

      protected long blobHeaderPosition(int segmentIndex)
      Deprecated.
    • requiredSegments

      protected int requiredSegments(long dataLength)
      Deprecated.
    • lock

      public FileLock lock() throws IOException
      Deprecated.
      Throws:
      IOException
    • force

      public void force(boolean metaData) throws IOException
      Deprecated.
      Throws:
      IOException
    • close

      public void close() throws IOException
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • toString

      @Nonnull public String toString()
      Deprecated.
      Overrides:
      toString in class Object