public class DocumentSnapshotRepositoryMonitorManagerImpl extends java.lang.Object implements DocumentSnapshotRepositoryMonitorManager
DocumentSnapshotRepositoryMonitorManager implementation. There is
one instance of this class per DiffingConnector created by Spring.
That instance gets signals from DiffingConnectorTraversalManager
to start (go from "cold" to "warm") and does so from scratch or from recovery
state. It creates the SnapshotStore instances and invokes
their recovery method. It creates and manages the
DocumentSnapshotRepositoryMonitor instances and passes guaranteed
checkpoints to these monitors.| Constructor and Description |
|---|
DocumentSnapshotRepositoryMonitorManagerImpl(java.util.List<? extends SnapshotRepository<? extends DocumentSnapshot>> repositories,
DocumentSnapshotFactory documentSnapshotFactory,
java.io.File snapshotDir,
ChecksumGenerator checksumGenerator,
ChangeQueue changeQueue,
CheckpointAndChangeQueue checkpointAndChangeQueue)
Constructs
DocumentSnapshotRepositoryMonitorManagerImpl
for the DiffingConnector. |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptGuarantees(java.util.Map<java.lang.String,MonitorCheckpoint> guarantees)
Receives information specifying what is guaranteed to be delivered to GSA.
|
void |
clean()
Removes persisted state for
DocumentSnapshotRepositoryMonitor
threads. |
CheckpointAndChangeQueue |
getCheckpointAndChangeQueue()
Returns the
CheckpointAndChangeQueue for this
DocumentSnapshotRepositoryMonitorManager |
int |
getThreadCount()
Returns the number of
DocumentSnapshotRepositoryMonitor threads
that are alive. |
boolean |
isRunning()
Returns whether we are after a start() call and before a stop().
|
void |
setTraversalSchedule(TraversalSchedule traversalSchedule)
Receives
TraversalSchedule from TraversalManager which is
TraversalScheduleAware. |
void |
start(java.lang.String connectorManagerCheckpoint)
Go from "cold" to "warm" including CheckpointAndChangeQueue.
|
void |
stop()
Stops all the configured
DocumentSnapshotRepositoryMonitor threads. |
public DocumentSnapshotRepositoryMonitorManagerImpl(java.util.List<? extends SnapshotRepository<? extends DocumentSnapshot>> repositories, DocumentSnapshotFactory documentSnapshotFactory, java.io.File snapshotDir, ChecksumGenerator checksumGenerator, ChangeQueue changeQueue, CheckpointAndChangeQueue checkpointAndChangeQueue)
DocumentSnapshotRepositoryMonitorManagerImpl
for the DiffingConnector.repositories - a List of SnapshotRepositorysdocumentSnapshotFactory - a DocumentSnapshotFactorysnapshotDir - directory to store SnapshotRepositorychecksumGenerator - a ChecksumGenerator used to
detect changes in a document's contentchangeQueue - a ChangeQueuecheckpointAndChangeQueue - a
CheckpointAndChangeQueuepublic void stop()
DocumentSnapshotRepositoryMonitorManagerDocumentSnapshotRepositoryMonitor threads.stop in interface DocumentSnapshotRepositoryMonitorManagerpublic void start(java.lang.String connectorManagerCheckpoint)
throws RepositoryException
start in interface DocumentSnapshotRepositoryMonitorManagerconnectorManagerCheckpoint - for the last completed document or null if none have
been completed.RepositoryExceptionpublic void clean()
DocumentSnapshotRepositoryMonitorManagerDocumentSnapshotRepositoryMonitor
threads. After calling this DocumentSnapshotRepositoryMonitor
threads will no longer be able to resume from where they left off last
time.clean in interface DocumentSnapshotRepositoryMonitorManagerpublic int getThreadCount()
DocumentSnapshotRepositoryMonitorManagerDocumentSnapshotRepositoryMonitor threads
that are alive. This method is for testing purposes.getThreadCount in interface DocumentSnapshotRepositoryMonitorManagerpublic CheckpointAndChangeQueue getCheckpointAndChangeQueue()
DocumentSnapshotRepositoryMonitorManagerCheckpointAndChangeQueue for this
DocumentSnapshotRepositoryMonitorManagergetCheckpointAndChangeQueue in interface DocumentSnapshotRepositoryMonitorManagerpublic boolean isRunning()
DocumentSnapshotRepositoryMonitorManagerisRunning in interface DocumentSnapshotRepositoryMonitorManagerpublic void acceptGuarantees(java.util.Map<java.lang.String,MonitorCheckpoint> guarantees)
DocumentSnapshotRepositoryMonitorManageracceptGuarantees in interface DocumentSnapshotRepositoryMonitorManagerpublic void setTraversalSchedule(TraversalSchedule traversalSchedule)
DocumentSnapshotRepositoryMonitorManagerTraversalSchedule from TraversalManager which is
TraversalScheduleAware.setTraversalSchedule in interface DocumentSnapshotRepositoryMonitorManager