public class GCUBELRFilePersistenceDelegate<RESOURCE extends GCUBELocalResource> extends GCUBEFilePersistenceDelegate<String,RESOURCE>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
LOCAL_FILE_SUFFIX
The suffix of file serialisation of resource.
|
logger| Constructor and Description |
|---|
GCUBELRFilePersistenceDelegate() |
| Modifier and Type | Method and Description |
|---|---|
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. |
getResourceIdentifiers, getStorageRoot, onLoad, onRemove, onStoreload, remove, storeprotected static final String LOCAL_FILE_SUFFIX
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.Copyright © 2015. All Rights Reserved.