|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.checker.ResultsPruner
public final class ResultsPruner
Manages the deletion of results from the checksum history. It uses the dspace.cfg file as the default configuration file for the deletion settings and can use a different configuration file if it is passed in.
| Constructor Summary | |
|---|---|
ResultsPruner()
Default Constructor |
|
| Method Summary | |
|---|---|
void |
addInterested(String result,
long duration)
Add a result and the length of time before the history with this type of result is removed from the database. |
void |
addInterested(String result,
String duration)
Add a result and the length of time before it is removed from the checksum history table. |
long |
getDefaultDuration()
The default amount of time before a result is removed. |
static ResultsPruner |
getDefaultPruner()
Factory method for the default results pruner configuration using dspace.cfg |
static ResultsPruner |
getPruner(Properties props)
Factory method for ResultsPruners (used to load ConfigurationManager properties. |
static ResultsPruner |
getPruner(String propsFile)
Factory method for ResultsPruners |
int |
prune()
Prunes the results retaining results as configured by the interests registered with this object. |
void |
setDefaultDuration(long defaultDuration)
The default duration before records are removed from the checksum history table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResultsPruner()
| Method Detail |
|---|
public static ResultsPruner getDefaultPruner()
public static ResultsPruner getPruner(String propsFile)
throws FileNotFoundException
propsFile - to configure the results pruner.
FileNotFoundException - it the configuration file cannot be found.
public static ResultsPruner getPruner(Properties props)
throws FileNotFoundException
props -
FileNotFoundException
public void addInterested(String result,
long duration)
result - code in the database.duration - before bitstreams with the specified result type in the
checksum history is removed.
public void addInterested(String result,
String duration)
throws ParseException
result - code in the database.duration - before bitstreams with the specified result type in the
checksum history is removed.
ParseException - if the duration cannot be parsed into a long value.public long getDefaultDuration()
public int prune()
public void setDefaultDuration(long defaultDuration)
defaultDuration - used before records are removed from the checksum history.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||