Class OverflowToDiskByteStorageFactory
- java.lang.Object
-
- com.android.tools.build.apkzlib.bytestorage.OverflowToDiskByteStorageFactory
-
- All Implemented Interfaces:
ByteStorageFactory
public class OverflowToDiskByteStorageFactory extends java.lang.Object implements ByteStorageFactory
ByteStorageFactorythat creates instances ofByteStoragethat will keep some data in memory and will overflow to disk when necessary.
-
-
Constructor Summary
Constructors Constructor Description OverflowToDiskByteStorageFactory(TemporaryDirectoryFactory temporaryDirectoryFactory)Creates a new factory with an optional in-memory size and a temporary directory for overflow.OverflowToDiskByteStorageFactory(java.lang.Long memoryCacheSizeInBytes, TemporaryDirectoryFactory temporaryDirectoryFactory)Creates a new factory with an optional in-memory size and a temporary directory for overflow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteStoragecreate()Creates a new storage.
-
-
-
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 theByteStorageinstances 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? Ifnullthen a default value will be usedtemporaryDirectoryFactory- a factory that creates temporary directories that will be used for overflow of theByteStorageinstances created by this factory
-
-
Method Detail
-
create
public ByteStorage create() throws java.io.IOException
Description copied from interface:ByteStorageFactoryCreates a new storage.- Specified by:
createin interfaceByteStorageFactory- Returns:
- a storage that should be closed when no longer used.
- Throws:
java.io.IOException
-
-