|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.whirr.state.ClusterStateStore
public abstract class ClusterStateStore
Interface for cluster state storage facilities.
Constructor Summary | |
---|---|
ClusterStateStore()
|
Method Summary | |
---|---|
abstract void |
destroy()
Destroys the provided cluster's state in storage. |
abstract Cluster |
load()
Deserializes cluster state from storage. |
abstract void |
save(Cluster cluster)
Saves cluster state to storage. |
protected String |
serialize(Cluster cluster)
Create parser friendly string representation for a Cluster |
Cluster |
tryLoadOrEmpty()
Try to load the cluster state or return an empty instance |
protected Cluster |
unserialize(ClusterSpec spec,
String content)
Rebuild the Cluster instance by using the string representation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterStateStore()
Method Detail |
---|
public abstract Cluster load() throws IOException
IOException
public Cluster tryLoadOrEmpty()
public abstract void save(Cluster cluster) throws IOException
cluster
-
IOException
public abstract void destroy() throws IOException
IOException
protected String serialize(Cluster cluster) throws IOException
Cluster
cluster
-
IOException
protected Cluster unserialize(ClusterSpec spec, String content) throws UnknownHostException
Cluster
instance by using the string representation
spec
- content
-
UnknownHostException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |