|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.persistence.GCUBERIPersistenceManager
org.gcube.common.core.persistence.GCUBERIFilePersistenceManager
public abstract class GCUBERIFilePersistenceManager
A GCUBERIPersistenceManager for Running Instances that persist their state on the file system.
| 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 | |
|---|---|
GCUBERIFilePersistenceManager(GCUBEServiceContext ctxt,
GCUBERIPersistenceManagerProfile profile)
Creates a new instance for a given service and from a given configuration profile. |
|
| Method Summary | |
|---|---|
protected void |
commitState()
Invoked by GCUBERIPersistenceManager.commit() to commit the state of the running instance. |
protected List<File> |
getState(File dir,
List<File>... files)
Used internally to enumerate the files that comprise the state to persist (i.e. |
protected File |
getStateFile()
Returns the file in which state is to be packaged. |
boolean |
isExclude(String name)
Used internally to check whether a given string matches at least one of the exclude directives. |
protected abstract void |
loadState()
Loads the state of the running instance from persistent storage. |
protected void |
packageState()
Packages the state of the running instance in a single file. |
protected void |
recoverState()
Invoked by GCUBERIPersistenceManager.recover() to recover the state of the running instance. |
protected abstract void |
storeState()
Stores the state of the running instance into persistent storage. |
protected void |
unpackageState()
Unpackages the state of the running instances from a single file. |
| Methods inherited from class org.gcube.common.core.persistence.GCUBERIPersistenceManager |
|---|
commit, exclude, getCommit, recover, setCommit, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GCUBERIFilePersistenceManager(GCUBEServiceContext ctxt,
GCUBERIPersistenceManagerProfile profile)
ctxt - the context of the service.profile - the configuration profile.| Method Detail |
|---|
protected void commitState()
throws Exception
GCUBERIPersistenceManager.commit() to commit the state of the running instance.
commitState in class GCUBERIPersistenceManagerException - if the state could not be committed.
protected void recoverState()
throws GCUBERIPersistenceManager.StateNotFoundException,
Exception
GCUBERIPersistenceManager.recover() to recover the state of the running instance.
recoverState in class GCUBERIPersistenceManagerException - if the state could not be recovered.
GCUBERIPersistenceManager.StateNotFoundException
protected List<File> getState(File dir,
List<File>... files)
dir - the start directory.files - (optional) the list of files to persist accumulated during recursive invocations.
public boolean isExclude(String name)
name - the name to match.
true if the string matches, false otherwise.
protected File getStateFile()
throws IOException
IOException
protected void packageState()
throws Exception
Exception - if the state could not be packaged.
protected void unpackageState()
throws Exception
Exception - if the state could not be unpackaged.
protected abstract void loadState()
throws GCUBERIPersistenceManager.StateNotFoundException,
Exception
Exception - if the state could not be loaded.
GCUBERIPersistenceManager.StateNotFoundException
protected abstract void storeState()
throws Exception
Exception - if the state could not be persisted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||