Class OverflowToDiskByteStorageFactory

    • Constructor Detail

      • OverflowToDiskByteStorageFactory

        public OverflowToDiskByteStorageFactory​(TemporaryDirectoryFactory temporaryDirectoryFactory)
        Creates a new factory with an optional in-memory size and a temporary directory for overflow.
        Parameters:
        temporaryDirectoryFactory - a factory that creates temporary directories that will be used for overflow of the ByteStorage instances created by this factory
      • OverflowToDiskByteStorageFactory

        public OverflowToDiskByteStorageFactory​(java.lang.Long memoryCacheSizeInBytes,
                                                TemporaryDirectoryFactory temporaryDirectoryFactory)
        Creates a new factory with an optional in-memory size and a temporary directory for overflow.
        Parameters:
        memoryCacheSizeInBytes - how many bytes to keep in memory? If null then a default value will be used
        temporaryDirectoryFactory - a factory that creates temporary directories that will be used for overflow of the ByteStorage instances created by this factory
    • Method Detail

      • create

        public ByteStorage create()
                           throws java.io.IOException
        Description copied from interface: ByteStorageFactory
        Creates a new storage.
        Specified by:
        create in interface ByteStorageFactory
        Returns:
        a storage that should be closed when no longer used.
        Throws:
        java.io.IOException