public final class ResultsPruner
extends java.lang.Object
| Constructor and Description |
|---|
ResultsPruner()
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterested(java.lang.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(java.lang.String result,
java.lang.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(java.util.Properties props)
Factory method for ResultsPruners (used to load ConfigurationManager
properties.
|
static ResultsPruner |
getPruner(java.lang.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.
|
public static ResultsPruner getDefaultPruner()
public static ResultsPruner getPruner(java.lang.String propsFile) throws java.io.FileNotFoundException
propsFile - to configure the results pruner.java.io.FileNotFoundException - it the configuration file cannot be found.public static ResultsPruner getPruner(java.util.Properties props) throws java.io.FileNotFoundException
props - java.io.FileNotFoundExceptionpublic void addInterested(java.lang.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(java.lang.String result,
java.lang.String duration)
throws java.text.ParseException
result - code in the database.duration - before bitstreams with the specified result type in the
checksum history is removed.java.text.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.Copyright © 2013 DuraSpace. All Rights Reserved.