public abstract class AbstractStorageEntry extends Object implements StorageEntry
StorageEntry
implementationModifier and Type | Field and Description |
---|---|
protected List<Blob> |
blobs |
protected List<Map<String,String>> |
cachedBlobs |
protected boolean |
completed |
protected boolean |
hasBlobs |
protected String |
id |
protected long |
lastStorageSize |
protected Map<String,Serializable> |
params |
Modifier | Constructor and Description |
---|---|
protected |
AbstractStorageEntry(String id) |
Modifier and Type | Method and Description |
---|---|
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 of the persisted Blobs.
|
Map<String,Serializable> |
getParameters()
Returns the named parameters.
|
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(String key,
Serializable value)
Add a named parameter to the entry
|
void |
putAll(Map<String,Serializable> p)
Put multiple named parameters.
|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beforeRemove
protected boolean hasBlobs
protected Map<String,Serializable> params
protected List<Map<String,String>> cachedBlobs
protected long lastStorageSize
protected boolean completed
protected AbstractStorageEntry(String id)
public String getId()
StorageEntry
getId
in interface StorageEntry
public void setBlobs(List<Blob> blobs)
StorageEntry
setBlobs
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 putAll(Map<String,Serializable> p)
StorageEntry
putAll
in interface StorageEntry
public Serializable get(String key)
StorageEntry
get
in interface StorageEntry
public Map<String,Serializable> getParameters()
StorageEntry
getParameters
in interface StorageEntry
public void persist(File directory)
StorageEntry
TransientStore
to persist the Blobs to disk and then be sure that the entry can be Serialized
without loosing any data.persist
in interface StorageEntry
public void load(File directory)
StorageEntry
TransientStore
to load Blobs from disk.load
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.