Package org.apache.cassandra.io.util
package org.apache.cassandra.io.util
-
ClassDescriptionAn implementation of the DataOutputStreamPlus interface using a ByteBuffer to stage writes before flushing them to an underlying channel.Buffer manager used for reading from a ChunkReader when cache is not in use.A proxy of a FileChannel that: - implements reference counting - exports only thread safe FileChannel operations - wraps IO exceptions into runtime exceptions Tested by RandomAccessReaderTest.CheckedFunction<T,
R, E extends Exception> RandomFileReader component that reads data from a file into a provided buffer and may have requirements over the size and alignment of reads.Input stream around a single ByteBuffer.Extension to DataInput that provides support for reading varintsWrapper around an InputStream that provides no buffering but can decode varintsAn implementation of the DataOutputStream interface using a FastByteArrayOutputStream and exposing its buffer so copies can be avoided.An implementation of the DataOutputStream interface using a FastByteArrayOutputStream and exposing its buffer so copies can be avoided.Extension to DataOutput that provides for writing ByteBuffer and Memory, potentially with an efficient implementation that is zero copy or at least has reduced bounds checking overhead.Abstract base class for DataOutputStreams that accept writes from ByteBuffer or Memory and also provide access to the underlying WritableByteChannel associated with their output stream.A thin wrapper around java.nio.file.Path to provide more ergonomic functionality.FileHandleprovides access to a file for reading, including the ones written by variousSequentialWriterinstances, and it is typically used bySSTableReader.Configures how the file will be read (compressed, mmapped, use cache etc.)This is the same as DataInputBuffer, i.e.a FilterInputStream that returns the remaining bytes to read from available() regardless of whether the device is ready to provide them.Rebufferer wrapper that applies rate limiting.An off-heap region of memory that must be manually free'd when no longer needed.This class provides a way to stream the writes into theMemoryIt is a utility class for cachingMmappedRegionsprimarily used by aFileHandle.Builderwhen a handle to the same file is created multiple times (as when an sstable is opened early).Rough equivalent of BufferedInputStream and DataInputStream wrapping the input stream of a File or Socket Created to work around the fact that when BIS + DIS delegate to NIO for socket IO they will allocate large thread local direct byte buffers when a large array is used to read.Vernacular: tryX means return false or 0L on any failure; XIfNotY means propagate any exceptions besides those caused by Y This class tries to apply uniform IOException handling, and does not propagate IOException except for NoSuchFileException.Base class for the RandomAccessReader components that implement reading.Rebufferer for reading data by a RandomAccessReader.Interface for the classes that can be used to instantiate rebufferers over a given file.Rough equivalent of BufferedInputStream and DataInputStream wrapping a ByteBuffer that can be refilled via rebuffer.Adds buffering, mark, and fsyncing to OutputStream.Class to hold a mark to the position of the fileSequentialWriter optionA very simple Bytebuffer pool with a fixed allocation size and a cached max allocation count.Utility class for sizing, writing and reading ints with length stored separately.Special rebufferer that replaces the tail of the file (from the specified cutoff point) with the given buffer.DataInput that also stores the raw inputs into an output buffer This is useful for storing serialized buffers as they are deserialized.Utility class that allow buffers to be reused by storing them in a thread local instance.This class is to track bytes read from given DataInputThis class is to track bytes read from given DataInputStreamBase class for DataOutput implementations that does not have an optimized implementations of Plus methods and does no buffering.When possible useWrappedDataOutputStreamPlusinstead of this class, as it will be more efficient when using Plus methods.Instantiated once per RandomAccessReader, thread-unsafe.