public class LargeCheckpointer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LargeCheckpointer.Keys
The random number suffixes below are in order to make it unlikely that an
application checkpoint is JSON-formatted exactly as a checkpoint handle.
|
static class |
LargeCheckpointer.LargeCheckpointerTest |
| Constructor and Description |
|---|
LargeCheckpointer(java.lang.String myID) |
LargeCheckpointer(java.lang.String dir,
java.lang.String myID) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static java.lang.String |
createCheckpointHandle(java.lang.String filename)
Replicable applications can use this method to create a
checkpoint handle after they have created a checkpoint in the file
filename. |
static boolean |
isCheckpointHandle(java.lang.String string) |
static void |
main(java.lang.String[] args) |
static java.lang.String |
restoreCheckpointHandle(java.lang.String handle,
java.lang.String localFilename)
Replicable applications can use this method to fetch the
checkpoint represented by the handle to a local file
localFilename. |
java.lang.String |
toString() |
static Replicable |
wrap(Replicable pi,
LargeCheckpointer lcp) |
public LargeCheckpointer(java.lang.String dir,
java.lang.String myID)
dir - myID - A unique ID for the node using this LargeCheckpointer
instance.public LargeCheckpointer(java.lang.String myID)
myID - public static java.lang.String restoreCheckpointHandle(java.lang.String handle,
java.lang.String localFilename)
Replicable applications can use this method to fetch the
checkpoint represented by the handle to a local file
localFilename. This method is useful in
Replicable.restore(String, String).
The parent directory of the file localFilename must exist,
otherwise NoSuchFileException will be thrown.
Applications are expected to delete localFilename after they are
done restoring from it.handle - localFilename - public static java.lang.String createCheckpointHandle(java.lang.String filename)
Replicable applications can use this method to create a
checkpoint handle after they have created a checkpoint in the file
filename.filename - filname formatted as a paxos checkpoint handle.public static boolean isCheckpointHandle(java.lang.String string)
string - public java.lang.String toString()
toString in class java.lang.Objectpublic void close()
public static void main(java.lang.String[] args)
args - public static Replicable wrap(Replicable pi, LargeCheckpointer lcp)
pi - lcp - Replicable application that stows away checkpoint
created by the application at a system location.