org.apache.whirr.state
Class FileClusterStateStore

java.lang.Object
  extended by org.apache.whirr.state.ClusterStateStore
      extended by org.apache.whirr.state.FileClusterStateStore

public class FileClusterStateStore
extends ClusterStateStore

Stores/Reads cluster state from a local file (located at: "~/.whirr/cluster-name/instances")


Constructor Summary
FileClusterStateStore(ClusterSpec spec)
           
 
Method Summary
 void destroy()
          Destroys the provided cluster's state in storage.
 Cluster load()
          Deserializes cluster state from storage.
 void save(Cluster cluster)
          Saves cluster state to storage.
 
Methods inherited from class org.apache.whirr.state.ClusterStateStore
serialize, tryLoadOrEmpty, unserialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileClusterStateStore

public FileClusterStateStore(ClusterSpec spec)
Method Detail

load

public Cluster load()
             throws IOException
Description copied from class: ClusterStateStore
Deserializes cluster state from storage.

Specified by:
load in class ClusterStateStore
Returns:
Throws:
IOException

destroy

public void destroy()
             throws IOException
Description copied from class: ClusterStateStore
Destroys the provided cluster's state in storage.

Specified by:
destroy in class ClusterStateStore
Throws:
IOException

save

public void save(Cluster cluster)
          throws IOException
Description copied from class: ClusterStateStore
Saves cluster state to storage.

Specified by:
save in class ClusterStateStore
Throws:
IOException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.