@ThreadSafe public final class TransientBinaryStore extends FileSystemBinaryStore
BinaryStore
implementation that does not persist the binary values beyond the lifetime of the virtual machine. This
implementation extends FileSystemBinaryStore
and uses a temporary directory. Thus, the binary values are not stored
in-memory.Modifier and Type | Field and Description |
---|---|
protected static File |
TRANSIENT_STORE_DIRECTORY |
TRASH_DIRECTORY_NAME
logger, MEDIUM_BUFFER_SIZE
Modifier and Type | Method and Description |
---|---|
static TransientBinaryStore |
get()
Obtain a shared
TransientBinaryStore instance. |
protected void |
initializeStorage(File directory)
Ensures that the directory used by this binary store exists and can be both read and written to.
|
protected void |
moveFileExclusively(File original,
File destination,
BinaryKey key) |
void |
start()
Initialize the store and get ready for use.
|
create, findFile, getAllBinaryKeys, getDirectory, getExtractedText, getInputStream, getStoredMimeType, markAsUnused, markAsUnused, markAsUsed, pruneEmptyDirectories, removeAllTrashFilesFor, removeValuesUnusedLongerThan, storeExtractedText, storeMimeType, storeValue, touch, upgradeTrashContentFormat
bestBufferSize, detector, extractors, getMimeType, getMinimumBinarySizeInBytes, getText, hasBinary, setMimeTypeDetector, setMinimumBinarySizeInBytes, setTextExtractors, shutdown, storeValue
protected static final File TRANSIENT_STORE_DIRECTORY
public static TransientBinaryStore get()
TransientBinaryStore
instance.public void start()
BinaryStore
start
in interface BinaryStore
start
in class AbstractBinaryStore
protected void initializeStorage(File directory) throws BinaryStoreException
initializeStorage
in class FileSystemBinaryStore
BinaryStoreException
- if the directory cannot be written to, read, or (if needed) createdprotected void moveFileExclusively(File original, File destination, BinaryKey key) throws BinaryStoreException
moveFileExclusively
in class FileSystemBinaryStore
BinaryStoreException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.