Class RSMonitor


  • public class RSMonitor
    extends Object
    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 Detail

      • RSMonitor

        public RSMonitor​(Morphium morphium)
    • Method Detail

      • start

        public void start()
      • terminate

        public void terminate()
      • execute

        public void execute()
      • getReplicaSetStatus

        public ReplicaSetStatus getReplicaSetStatus​(boolean full)
        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