@Experimental(comment="https://jira.nuxeo.com/browse/NXP-16577") public interface StorageEntry extends Serializable
TransientStore
. The entry is will be stored in 2 sub parts :
the Blobs that will be stored in file system, and the java attributes that will be kept in memoryModifier and Type | Method and Description |
---|---|
List<Blob> |
addBlob(Blob blob)
Adds a
Blob to the list of persisted Blobs |
void |
beforeRemove()
Callback to do some cleanup before entry is removed from the
TransientStore |
Serializable |
get(String key)
Reads the value of named parameters
|
List<Blob> |
getBlobs() |
String |
getId()
Returns the id associated with an entry In the default implementation this id must an ascii alphanumeric string
|
long |
getLastStorageSize()
Returns the size last time the entry was stored
|
long |
getSize()
Returns the size of the persisted Blobs
|
void |
load(File directory)
Called by
TransientStore to load Blobs from disk |
void |
persist(File directory)
Called by
TransientStore to persist the Blobs to disk and then be sure that the entry can be Serialized
without loosing any data |
void |
put(String key,
Serializable value)
Add a named parameter to the entry
|
void |
setBlobs(List<Blob> blobs)
Set the Blobs that must be associated with the entry
|
String getId()
void setBlobs(List<Blob> blobs)
blobs
- List<Blob> addBlob(Blob blob)
Blob
to the list of persisted Blobsblob
- void put(String key, Serializable value)
key
- the name of the parametervalue
- the Serializable
valueSerializable get(String key)
key
- void beforeRemove()
TransientStore
void persist(File directory) throws IOException
TransientStore
to persist the Blobs to disk and then be sure that the entry can be Serialized
without loosing any datadirectory
- IOException
void load(File directory) throws IOException
TransientStore
to load Blobs from diskdirectory
- IOException
long getSize()
long getLastStorageSize()
Copyright © 2015 Nuxeo SA. All rights reserved.