Class MappedBufferManager

    • Field Detail

      • DEFAULT_MIN_SIZE

        public static final int DEFAULT_MIN_SIZE
        Default minimum size for a memory mapped file.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_SIZE

        public static final int DEFAULT_MAX_SIZE
        Default maximum size for a memory mapped file.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MappedBufferManager

        public MappedBufferManager()
        Construct a MappedBufferManager using defaults.
      • MappedBufferManager

        public MappedBufferManager​(int cbInitial,
                                   int cbMaximum,
                                   File file)
        Construct a MappedBufferManager that supports a buffer of a certain initial and maximum size.
        Parameters:
        cbInitial - the initial size
        cbMaximum - the maximum size
        file - the file to use, or the directory to use, or null to generate a temporary file in the default location
    • Method Detail

      • configureFile

        protected void configureFile​(File file)
        Configure the buffer manager based on the passed file, which may be null to imply a default temp file, a directory to imply that a file be created in that directory, or it may be the temp file itself.
        Parameters:
        file - the file to use, or the directory to use, or null to generate a temporary file in the default location
      • getFile

        protected RandomAccessFile getFile()
        Obtain the RandomAccessFile that the buffer is constructed on.
        Returns:
        the RandomAccessFile object
      • setFile

        protected void setFile​(RandomAccessFile file)
        Specify the RandomAccessFile that the buffer will be constructed on.
        Parameters:
        file - the RandomAccessFile object
      • close

        public void close()
        Close the underlying resources.
      • finalize

        protected void finalize()
        Perform cleanup during garbage collection.
        Overrides:
        finalize in class Object