Package org.dspace.checker
Class SimpleDispatcher
- java.lang.Object
-
- org.dspace.checker.SimpleDispatcher
-
- All Implemented Interfaces:
BitstreamDispatcher
public class SimpleDispatcher extends Object implements BitstreamDispatcher
An implementation of the selection strategy that selects bitstreams in the order that they were last checked, looping endlessly.- Author:
- Jim Downing, Grace Carpenter, Nathan Sarr
-
-
Field Summary
Fields Modifier and Type Field Description protected MostRecentChecksumServicechecksumServiceAccess for bitstream informationprotected Contextcontextprotected booleanloopContinuouslyShould this dispatcher keep on dispatching around the collection?protected DateprocessStartTimeDate this dispatcher started dispatching.-
Fields inherited from interface org.dspace.checker.BitstreamDispatcher
SENTINEL
-
-
Constructor Summary
Constructors Constructor Description SimpleDispatcher(Context context, Date startTime, boolean looping)Creates a new SimpleDispatcher.
-
-
-
Field Detail
-
loopContinuously
protected boolean loopContinuously
Should this dispatcher keep on dispatching around the collection?
-
processStartTime
protected Date processStartTime
Date this dispatcher started dispatching.
-
checksumService
protected MostRecentChecksumService checksumService
Access for bitstream information
-
context
protected Context context
-
-
Constructor Detail
-
SimpleDispatcher
public SimpleDispatcher(Context context, Date startTime, boolean looping)
Creates a new SimpleDispatcher.- Parameters:
context- ContextstartTime- timestamp for beginning of checker processlooping- indicates whether checker should loop infinitely through most_recent_checksum table
-
-
Method Detail
-
next
public Bitstream next() throws SQLException
Selects the next candidate bitstream.- Specified by:
nextin interfaceBitstreamDispatcher- Returns:
- the next bitstream id, or BitstreamDispatcher.SENTINEL if there isn't another value
- Throws:
SQLException- if database error- See Also:
BitstreamDispatcher.next()
-
-