public class OverflowToDiskByteStorageFactory extends java.lang.Object implements ByteStorageFactory
ByteStorageFactory that creates instances of ByteStorage that will keep some data
in memory and will overflow to disk when necessary.| Constructor and Description |
|---|
OverflowToDiskByteStorageFactory(java.lang.Long memoryCacheSizeInBytes,
TemporaryDirectoryFactory temporaryDirectoryFactory)
Creates a new factory with an optional in-memory size and a temporary directory for overflow.
|
OverflowToDiskByteStorageFactory(TemporaryDirectoryFactory temporaryDirectoryFactory)
Creates a new factory with an optional in-memory size and a temporary directory for overflow.
|
| Modifier and Type | Method and Description |
|---|---|
ByteStorage |
create()
Creates a new storage.
|
public OverflowToDiskByteStorageFactory(TemporaryDirectoryFactory temporaryDirectoryFactory)
temporaryDirectoryFactory - a factory that creates temporary directories that will be used
for overflow of the ByteStorage instances created by this factorypublic OverflowToDiskByteStorageFactory(java.lang.Long memoryCacheSizeInBytes,
TemporaryDirectoryFactory temporaryDirectoryFactory)
memoryCacheSizeInBytes - how many bytes to keep in memory? If nul then a default
value will be usedtemporaryDirectoryFactory - a factory that creates temporary directories that will be used
for overflow of the ByteStorage instances created by this factorypublic ByteStorage create() throws java.io.IOException
ByteStorageFactorycreate in interface ByteStorageFactoryjava.io.IOException