org.gcube.common.core.persistence
Class GCUBERINoPersistenceManager

java.lang.Object
  extended by org.gcube.common.core.persistence.GCUBERIPersistenceManager
      extended by org.gcube.common.core.persistence.GCUBERINoPersistenceManager

public class GCUBERINoPersistenceManager
extends GCUBERIPersistenceManager

Simulated implementation ofGCUBERIPersistenceManager.

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.common.core.persistence.GCUBERIPersistenceManager
GCUBERIPersistenceManager.StateChangeConsumer, GCUBERIPersistenceManager.StateNotFoundException
 
Field Summary
 
Fields inherited from class org.gcube.common.core.persistence.GCUBERIPersistenceManager
ctxt, excludes, logger, profile
 
Constructor Summary
GCUBERINoPersistenceManager(GCUBEServiceContext ctxt, GCUBERIPersistenceManagerProfile profile)
          Creates a new instance for a given service and from a given configuration profile.
 
Method Summary
 void commit()
          Commits the state of the running instance.
protected  void commitState()
          Invoked by GCUBERIPersistenceManager.commit() to commit the state of the running instance.
 void recover()
          Recovers the state of the running instance.
protected  void recoverState()
          Invoked by GCUBERIPersistenceManager.recover() to recover the state of the running instance.
 
Methods inherited from class org.gcube.common.core.persistence.GCUBERIPersistenceManager
exclude, getCommit, setCommit, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCUBERINoPersistenceManager

public GCUBERINoPersistenceManager(GCUBEServiceContext ctxt,
                                   GCUBERIPersistenceManagerProfile profile)
Creates a new instance for a given service and from a given configuration profile.

Parameters:
ctxt - the context of the service.
profile - the configuration profile.
Method Detail

recover

public void recover()
             throws Exception
Recovers the state of the running instance.

Overrides:
recover in class GCUBERIPersistenceManager
Throws:
Exception - if the state could not be recovered.

commit

public void commit()
            throws Exception
Commits the state of the running instance.

Overrides:
commit in class GCUBERIPersistenceManager
Throws:
Exception - if the state could not be committed.

commitState

protected void commitState()
                    throws Exception
Invoked by GCUBERIPersistenceManager.commit() to commit the state of the running instance.

Specified by:
commitState in class GCUBERIPersistenceManager
Throws:
Exception - if the state could not be committed.

recoverState

protected void recoverState()
                     throws GCUBERIPersistenceManager.StateNotFoundException,
                            Exception
Invoked by GCUBERIPersistenceManager.recover() to recover the state of the running instance.

Specified by:
recoverState in class GCUBERIPersistenceManager
Throws:
Exception - if the state could not be recovered.
GCUBERIPersistenceManager.StateNotFoundException


Copyright © 2012. All Rights Reserved.