|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.persistence.GCUBEPersistenceDelegate<RESOURCEID,RESOURCE>
org.gcube.common.core.persistence.GCUBEFilePersistenceDelegate<String,RESOURCE>
org.gcube.common.core.persistence.GCUBELRFilePersistenceDelegate<RESOURCE>
public class GCUBELRFilePersistenceDelegate<RESOURCE extends GCUBELocalResource>
| Field Summary | |
|---|---|
protected static String |
LOCAL_FILE_SUFFIX
The suffix of file serialisation of resource. |
| Fields inherited from class org.gcube.common.core.persistence.GCUBEPersistenceDelegate |
|---|
logger |
| Constructor Summary | |
|---|---|
GCUBELRFilePersistenceDelegate()
|
|
| Method Summary | |
|---|---|
protected File |
getFileFromResource(RESOURCE resource)
Returns the file serialisation of a resource. |
protected String |
getIDFromFileName(String s)
Returns a resource identifier from a string. |
protected String |
getSuffix()
Returns the suffix for resource file serialisations. |
void |
initialise(GCUBEResourceHome<? super String,String,RESOURCE> home)
Initialises the delegate from the GCUBEResourceHome of the associated resources. |
protected void |
onLoad(RESOURCE resource,
ObjectInputStream stream)
Deserialises the state of resource from a ObjectInputStream. |
protected void |
onStore(RESOURCE resource,
ObjectOutputStream stream)
Serialises the state of a resource into a ObjectOutputStream. |
| Methods inherited from class org.gcube.common.core.persistence.GCUBEFilePersistenceDelegate |
|---|
getResourceIdentifiers, getStorageRoot, onLoad, onRemove, onStore |
| Methods inherited from class org.gcube.common.core.persistence.GCUBEPersistenceDelegate |
|---|
load, remove, store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String LOCAL_FILE_SUFFIX
| Constructor Detail |
|---|
public GCUBELRFilePersistenceDelegate()
| Method Detail |
|---|
public void initialise(GCUBEResourceHome<? super String,String,RESOURCE> home)
throws Exception
GCUBEResourceHome of the associated resources.
initialise in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>home - the home.
Exception - if the delegate could not be initialised.protected File getFileFromResource(RESOURCE resource)
getFileFromResource in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>
protected void onLoad(RESOURCE resource,
ObjectInputStream stream)
throws Exception
ObjectInputStream.
Extends in accordance with resource semantics.
onLoad in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>stream - the stream.
Exception - if the stream could not be processed.
protected void onStore(RESOURCE resource,
ObjectOutputStream stream)
throws Exception
ObjectOutputStream.
Extend in accordance with resource semantics.
onStore in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>stream - the stream.
Exception - if the stream could not be processed.protected String getSuffix()
getSuffix in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>protected String getIDFromFileName(String s)
getIDFromFileName in class GCUBEFilePersistenceDelegate<String,RESOURCE extends GCUBELocalResource>s - the string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||