ModeShape Distribution 3.0.0.CR1

org.modeshape.jcr.value.binary
Class TransientBinaryStore

java.lang.Object
  extended by org.modeshape.jcr.value.binary.AbstractBinaryStore
      extended by org.modeshape.jcr.value.binary.FileSystemBinaryStore
          extended by org.modeshape.jcr.value.binary.TransientBinaryStore
All Implemented Interfaces:
BinaryStore

@ThreadSafe
public final class TransientBinaryStore
extends FileSystemBinaryStore

A 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.


Field Summary
protected static File TRANSIENT_STORE_DIRECTORY
           
 
Fields inherited from class org.modeshape.jcr.value.binary.FileSystemBinaryStore
TRASH_DIRECTORY_NAME
 
Fields inherited from class org.modeshape.jcr.value.binary.AbstractBinaryStore
logger, MEDIUM_BUFFER_SIZE
 
Method Summary
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.
 
Methods inherited from class org.modeshape.jcr.value.binary.FileSystemBinaryStore
create, findFile, getAllBinaryKeys, getDirectory, getExtractedText, getInputStream, getStoredMimeType, markAsUnused, markAsUnused, moveFileExclusively, pruneEmptyDirectories, removeValuesUnusedLongerThan, storeExtractedText, storeMimeType, storeValue, touch
 
Methods inherited from class org.modeshape.jcr.value.binary.AbstractBinaryStore
bestBufferSize, detector, extractors, getMimeType, getMinimumBinarySizeInBytes, getText, setMimeTypeDetector, setMinimumBinarySizeInBytes, setTextExtractors, shutdown, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSIENT_STORE_DIRECTORY

protected static final File TRANSIENT_STORE_DIRECTORY
Method Detail

get

public static TransientBinaryStore get()
Obtain a shared TransientBinaryStore instance.

Returns:
the instance; never null

initializeStorage

protected void initializeStorage(File directory)
                          throws BinaryStoreException
Ensures that the directory used by this binary store exists and can be both read and written to.

Overrides:
initializeStorage in class FileSystemBinaryStore
Throws:
BinaryStoreException - if the directory cannot be written to, read, or (if needed) created

ModeShape Distribution 3.0.0.CR1

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.