|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.javaGenes.core.Checkpointer
Runs a Checkpointable job. Modify static final private Checkpointer read(String f, String className, String[] arguments) when you want to evolve a new kind of data structure and have implemented the relevant classes: RunFoo FooParameters FooPopulation FooIndividual and any mutator or crossover operators necessary As a general rule, the static methods are used for checkpointing calls since these are accessible everywhere without passing the Checkpointer object around as an argument.
Field Summary | |
protected boolean |
checkpointASAP
|
protected static Checkpointer |
currentCheckpointer
|
protected int |
excessiveTimeBetweenCheckpointOKs
|
protected static java.lang.String |
filename
|
protected java.util.Date |
lastCheckpointDate
|
protected long |
lastOkToCheckpoint
|
protected boolean |
mustPrepareToDie
|
protected gov.nasa.javaGenes.core.Checkpointable |
objectToCheckpoint
|
protected boolean |
readyToDieNow
|
protected long |
timeBetweenCheckpoints
|
Method Summary | |
static boolean |
areYouPreparingToDie()
Called by an external agency. |
boolean |
areYouPreparingToDieLocal()
Not normally not called directly |
static boolean |
areYouReadyToDie()
Called by an external agency. |
boolean |
areYouReadyToDieLocal()
Not normally not called directly |
static void |
cancelDeath()
Called by an external agency. |
void |
cancelDeathLocal()
Not normally not called directly |
static void |
checkpoint()
called by a Checkpointable. |
static void |
checkpoint(java.lang.String f)
called by a Checkpointable. |
void |
checkpointLocal()
Not normally not called directly |
void |
checkpointLocal(java.lang.String f)
Not normally not called directly |
static void |
checkpointWhenPossible()
Called by an external agency. |
void |
checkpointWhenPossibleLocal()
Not normally not called directly |
static void |
dontCheckpoint()
Called by an external agency. |
void |
dontCheckpointLocal()
Not normally not called directly |
static java.util.Date |
getLastCheckpointDate()
|
java.util.Date |
getLastCheckpointDateLocal()
Not normally not called directly |
protected static Checkpointer |
getSerialized(java.lang.String filename)
|
static void |
main(java.lang.String[] a)
Will restart if a checkpoint file exists, will start if not. |
static void |
ok()
called by a Checkpointable. |
void |
okLocal()
Not normally not called directly |
static void |
prepareToDie()
Called by an external agency. |
void |
prepareToDieLocal()
Not normally not called directly |
void |
printCheckpointStatistics()
creates checkpoint_filename.statistics.txt and puts mean, standard deviation, highest, and lowest time between checkpoints. |
void |
restart()
Not normally not called directly |
void |
start(java.lang.String[] arguments)
Not normally not called directly |
protected static void |
startPeriodicCheckpoint(Checkpointer current,
long interval)
starts a thread that will execute periodic checkpoints |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static volatile Checkpointer currentCheckpointer
protected volatile gov.nasa.javaGenes.core.Checkpointable objectToCheckpoint
protected static volatile java.lang.String filename
protected volatile int excessiveTimeBetweenCheckpointOKs
protected long timeBetweenCheckpoints
protected volatile java.util.Date lastCheckpointDate
protected volatile long lastOkToCheckpoint
protected volatile boolean checkpointASAP
protected volatile boolean mustPrepareToDie
protected volatile boolean readyToDieNow
Method Detail |
public static void main(java.lang.String[] a)
protected static void startPeriodicCheckpoint(Checkpointer current, long interval)
public static final void ok()
public static final void checkpoint()
public static final void checkpoint(java.lang.String f)
public static final void checkpointWhenPossible()
public static final void dontCheckpoint()
public static final void prepareToDie()
public static final boolean areYouPreparingToDie()
public static final boolean areYouReadyToDie()
public static final void cancelDeath()
public static final java.util.Date getLastCheckpointDate()
public void start(java.lang.String[] arguments)
public void restart()
public final void okLocal()
public final void checkpointLocal(java.lang.String f)
public final void checkpointLocal()
public final void cancelDeathLocal()
public final void checkpointWhenPossibleLocal()
public final void dontCheckpointLocal()
public final void prepareToDieLocal()
public final boolean areYouPreparingToDieLocal()
public final boolean areYouReadyToDieLocal()
public final java.util.Date getLastCheckpointDateLocal()
public void printCheckpointStatistics()
protected static Checkpointer getSerialized(java.lang.String filename)
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |