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 SnapshotRepositorys
documentSnapshotFactory
- a DocumentSnapshotFactory
snapshotDir
- directory to store SnapshotRepository
checksumGenerator
- a ChecksumGenerator
used to
detect changes in a document's contentchangeQueue
- a ChangeQueue
checkpointAndChangeQueue
- a
CheckpointAndChangeQueue
public void stop()
DocumentSnapshotRepositoryMonitorManager
DocumentSnapshotRepositoryMonitor
threads.stop
in interface DocumentSnapshotRepositoryMonitorManager
public void start(java.lang.String connectorManagerCheckpoint) throws RepositoryException
start
in interface DocumentSnapshotRepositoryMonitorManager
connectorManagerCheckpoint
- for the last completed document or null if none have
been completed.RepositoryException
public void clean()
DocumentSnapshotRepositoryMonitorManager
DocumentSnapshotRepositoryMonitor
threads. After calling this DocumentSnapshotRepositoryMonitor
threads will no longer be able to resume from where they left off last
time.clean
in interface DocumentSnapshotRepositoryMonitorManager
public int getThreadCount()
DocumentSnapshotRepositoryMonitorManager
DocumentSnapshotRepositoryMonitor
threads
that are alive. This method is for testing purposes.getThreadCount
in interface DocumentSnapshotRepositoryMonitorManager
public CheckpointAndChangeQueue getCheckpointAndChangeQueue()
DocumentSnapshotRepositoryMonitorManager
CheckpointAndChangeQueue
for this
DocumentSnapshotRepositoryMonitorManager
getCheckpointAndChangeQueue
in interface DocumentSnapshotRepositoryMonitorManager
public boolean isRunning()
DocumentSnapshotRepositoryMonitorManager
isRunning
in interface DocumentSnapshotRepositoryMonitorManager
public void acceptGuarantees(java.util.Map<java.lang.String,MonitorCheckpoint> guarantees)
DocumentSnapshotRepositoryMonitorManager
acceptGuarantees
in interface DocumentSnapshotRepositoryMonitorManager
public void setTraversalSchedule(TraversalSchedule traversalSchedule)
DocumentSnapshotRepositoryMonitorManager
TraversalSchedule
from TraversalManager which is
TraversalScheduleAware
.setTraversalSchedule
in interface DocumentSnapshotRepositoryMonitorManager