RESOURCEID - the identifier of the resource type.public class GCUBENoPersistenceDelegate<RESOURCEID> extends GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>
GCUBEPersistenceDelegate which simulates serialisation and deserialisation
of GCUBEStatefulResources.
It is used as the delegate of resources which do not explicitly indicate one in the configuration of their
GCUBEResourceHome.
logger| Constructor and Description |
|---|
GCUBENoPersistenceDelegate() |
| Modifier and Type | Method and Description |
|---|---|
List<RESOURCEID> |
getResourceIdentifiers()
Returns the identifiers of all the resources serialised by the delegate.
|
void |
load(GCUBEStatefulResource<RESOURCEID> resource,
boolean firstLoad)
Deserialises the state of an uninitialised resource.
|
protected void |
onLoad(GCUBEStatefulResource<RESOURCEID> resource,
boolean firstLoad)
Invoked by
GCUBEPersistenceDelegate.load(GCUBEStatefulResource, boolean) to deserialise a resource. |
protected void |
onRemove(GCUBEStatefulResource<RESOURCEID> resource)
Invoked by
GCUBEPersistenceDelegate.remove(GCUBEStatefulResource) to remove the serialisation of a resource. |
protected void |
onStore(GCUBEStatefulResource<RESOURCEID> resource)
Invoked by
GCUBEPersistenceDelegate.store(GCUBEStatefulResource) to serialise a resource. |
void |
remove(GCUBEStatefulResource<RESOURCEID> resource)
Removes the serialisation of a resource.
|
void |
store(GCUBEStatefulResource<RESOURCEID> resource)
Serialises the state of a resource.
|
initialisepublic void load(GCUBEStatefulResource<RESOURCEID> resource, boolean firstLoad) throws Exception
load in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>resource - the resource.firstLoad - true if the resource has not been previously loaded since the container last booted, false otherwise.Exception - if the resource could not be deserialised.public void store(GCUBEStatefulResource<RESOURCEID> resource)
store in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>resource - the resource.public void remove(GCUBEStatefulResource<RESOURCEID> resource)
remove in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>resource - the resource.protected void onLoad(GCUBEStatefulResource<RESOURCEID> resource, boolean firstLoad) throws Exception
GCUBEPersistenceDelegate.load(GCUBEStatefulResource, boolean) to deserialise a resource.
Implement in accordance with resource and serialisation semantics.onLoad in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>firstLoad - true if the resource has not been previously loaded since the container last booted, false otherwise.Exception - if the resource could not be deserialised.GCUBEPersistenceDelegate.load(GCUBEStatefulResource, boolean)protected void onStore(GCUBEStatefulResource<RESOURCEID> resource) throws Exception
GCUBEPersistenceDelegate.store(GCUBEStatefulResource) to serialise a resource.
Implement in accordance with serialisation and resource semantics.onStore in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>Exception - if the resource could not be serialised.GCUBEPersistenceDelegate.store(GCUBEStatefulResource)protected void onRemove(GCUBEStatefulResource<RESOURCEID> resource) throws Exception
GCUBEPersistenceDelegate.remove(GCUBEStatefulResource) to remove the serialisation of a resource.
Implement in accordance with serialisation and resource semantics.onRemove in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>Exception - if the resource serialisation could not be removed.GCUBEPersistenceDelegate.remove(GCUBEStatefulResource)public List<RESOURCEID> getResourceIdentifiers()
getResourceIdentifiers in class GCUBEPersistenceDelegate<RESOURCEID,GCUBEStatefulResource<RESOURCEID>>Copyright © 2015. All Rights Reserved.