Klasse RSMonitor

java.lang.Object
de.caluga.morphium.replicaset.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
  • Konstruktordetails

    • RSMonitor

      public RSMonitor(Morphium morphium)
  • Methodendetails

    • start

      public void start()
    • addListener

      public void addListener(ReplicasetStatusListener lst)
    • removeListener

      public void removeListener(ReplicasetStatusListener lst)
    • 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
      Parameter:
      full - - if true- return full status
      Gibt zurück:
      status
    • getCurrentStatus

      public ReplicaSetStatus getCurrentStatus()