Package de.caluga.morphium.replicaset
Class RSMonitor
java.lang.Object
de.caluga.morphium.replicaset.RSMonitor
Used in a Thread or executor.
Checks for the replicaset status periodically.
Used in order to get number of currently active nodes and their state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidexecute()getReplicaSetStatus(boolean full) get the current replicaset status - issues the replSetGetStatus command to mongo if full==true, also the configuration is read.voidvoidstart()void
-
Constructor Details
-
RSMonitor
-
-
Method Details
-
start
public void start() -
addListener
-
removeListener
-
terminate
public void terminate() -
execute
public void execute() -
getReplicaSetStatus
get the current replicaset status - issues the replSetGetStatus command to mongo if full==true, also the configuration is read. This method is called with full==false for every write in case a Replicaset is configured to find out the current number of active nodes- Parameters:
full- - if true- return full status- Returns:
- status
-
getCurrentStatus
-