|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.persistence.GCUBERIPersistenceManager
public abstract class GCUBERIPersistenceManager
Partial implementation of remote persistence managers for Running Instances of stateful gCube services.
| Nested Class Summary | |
|---|---|
protected class |
GCUBERIPersistenceManager.StateChangeConsumer
Consumer of state change events. |
class |
GCUBERIPersistenceManager.StateNotFoundException
Signals the lack of remote state. |
| Field Summary | |
|---|---|
protected GCUBEServiceContext |
ctxt
The context of the service. |
protected List<Pattern> |
excludes
List of excludes directives. |
protected GCUBELog |
logger
Instance Logger |
protected GCUBERIPersistenceManagerProfile |
profile
The configuration profile of the manager. |
| Constructor Summary | |
|---|---|
GCUBERIPersistenceManager(GCUBEServiceContext ctxt,
GCUBERIPersistenceManagerProfile profile)
Creates a new instance for a given service and from a given configuration profile. |
|
| Method Summary | |
|---|---|
protected void |
commit()
Commits the state of the running instance. |
protected abstract void |
commitState()
Invoked by commit() to commit the state of the running instance. |
void |
exclude(String... excludes)
Add one or more regular expressions as exclude directives. |
protected boolean |
getCommit()
Returns the commit flag value. |
void |
recover()
Recovers the state of the running instance. |
protected abstract void |
recoverState()
Invoked by recover() to recover the state of the running instance. |
void |
setCommit(boolean value)
Sets the commit flag. |
void |
setLogger(GCUBELog logger)
Sets the instance logger. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GCUBELog logger
protected GCUBEServiceContext ctxt
protected GCUBERIPersistenceManagerProfile profile
protected List<Pattern> excludes
| Constructor Detail |
|---|
public GCUBERIPersistenceManager(GCUBEServiceContext ctxt,
GCUBERIPersistenceManagerProfile profile)
ctxt - the context of the service.profile - the configuration profile.| Method Detail |
|---|
public void setLogger(GCUBELog logger)
logger - the logger.public void setCommit(boolean value)
value - the flag value.protected boolean getCommit()
protected void commit()
throws Exception
Exception - if the state could not be committed.
protected abstract void commitState()
throws Exception
commit() to commit the state of the running instance.
Exception - if the state could not be committed.
public void recover()
throws Exception
Exception - if the state could not be recovered.
protected abstract void recoverState()
throws GCUBERIPersistenceManager.StateNotFoundException,
Exception
recover() to recover the state of the running instance.
Exception - if the state could not be recovered.
GCUBERIPersistenceManager.StateNotFoundExceptionpublic void exclude(String... excludes)
excludes - the regular expressions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||