public class Checkpoint extends Object implements org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected ConfigPath |
checkpointDir
Checkpoints directory; either an absolute path, or relative to the
CheckpointService's checkpointsDirectory (which will be inserted as
the COnfigPath base before the Checkpoint is consulted).
|
protected boolean |
forgetAllButLatest |
static DecimalFormat |
INDEX_FORMAT
format for serial numbers
|
protected String |
name |
protected String |
shortName |
protected boolean |
success |
static String |
VALIDITY_STAMP_FILENAME
Name of file written with timestamp into valid checkpoints
|
Constructor and Description |
---|
Checkpoint() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
generateFrom(ConfigPath checkpointsDir,
int nextCheckpointNumber)
Use immediately after instantiation to fill-in a Checkpoint
created outside Spring configuration.
|
ConfigPath |
getCheckpointDir() |
boolean |
getForgetAllButLatest() |
String |
getName() |
String |
getShortName() |
boolean |
getSuccess() |
static boolean |
hasValidStamp(File checkpointDirectory) |
org.json.JSONObject |
loadJson(String beanName) |
BufferedReader |
loadReader(String beanName,
String extraName) |
void |
saveJson(String beanName,
org.json.JSONObject json) |
BufferedWriter |
saveWriter(String beanName,
String extraName) |
void |
setCheckpointDir(ConfigPath checkpointsDir) |
void |
setForgetAllButLatest(boolean b) |
void |
setSuccess(boolean b) |
void |
writeValidity(String stamp) |
public static final DecimalFormat INDEX_FORMAT
public static final String VALIDITY_STAMP_FILENAME
protected String name
protected String shortName
protected boolean success
protected ConfigPath checkpointDir
protected boolean forgetAllButLatest
public ConfigPath getCheckpointDir()
public void setCheckpointDir(ConfigPath checkpointsDir)
public void generateFrom(ConfigPath checkpointsDir, int nextCheckpointNumber) throws IOException
checkpointsDir
- nextCheckpointNumber
- IOException
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void setSuccess(boolean b)
public boolean getSuccess()
public String getName()
public String getShortName()
public void writeValidity(String stamp)
public void saveJson(String beanName, org.json.JSONObject json)
public org.json.JSONObject loadJson(String beanName)
public BufferedWriter saveWriter(String beanName, String extraName) throws IOException
IOException
public BufferedReader loadReader(String beanName, String extraName) throws IOException
IOException
public static boolean hasValidStamp(File checkpointDirectory)
public void setForgetAllButLatest(boolean b)
public boolean getForgetAllButLatest()
Copyright © 2003-2014 Internet Archive. All Rights Reserved.