public abstract class AbstractStorageEntry extends Object implements StorageEntry
StorageEntry
implementationModifier and Type | Method and Description |
---|---|
List<Blob> |
addBlob(Blob blob)
Adds a
Blob to the list of persisted Blobs |
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
|
boolean |
isCompleted()
flag to indicate if result is ready
|
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(Map<String,Serializable> p)
Put multiple named parameters
|
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
|
void |
setCompleted(boolean completed)
Mark the storage entry as ready
|
void |
setLastStorageSize(long lastStorageSize) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beforeRemove
public String getId()
StorageEntry
getId
in interface StorageEntry
public void setBlobs(List<Blob> blobs)
StorageEntry
setBlobs
in interface StorageEntry
public List<Blob> addBlob(Blob blob)
StorageEntry
Blob
to the list of persisted BlobsaddBlob
in interface StorageEntry
public List<Blob> getBlobs()
getBlobs
in interface StorageEntry
public void put(String key, Serializable value)
StorageEntry
put
in interface StorageEntry
key
- the name of the parametervalue
- the Serializable
valuepublic void put(Map<String,Serializable> p)
StorageEntry
put
in interface StorageEntry
public Serializable get(String key)
StorageEntry
get
in interface StorageEntry
public void persist(File directory) throws IOException
StorageEntry
TransientStore
to persist the Blobs to disk and then be sure that the entry can be Serialized
without loosing any datapersist
in interface StorageEntry
IOException
public void load(File directory)
StorageEntry
TransientStore
to load Blobs from diskload
in interface StorageEntry
public long getSize()
StorageEntry
getSize
in interface StorageEntry
public long getLastStorageSize()
StorageEntry
getLastStorageSize
in interface StorageEntry
public void setLastStorageSize(long lastStorageSize)
public boolean isCompleted()
StorageEntry
isCompleted
in interface StorageEntry
public void setCompleted(boolean completed)
StorageEntry
setCompleted
in interface StorageEntry
Copyright © 2015 Nuxeo SA. All rights reserved.