Class MongoStatus

  • All Implemented Interfaces:
    com.mongodb.event.ServerMonitorListener, java.util.EventListener

    public class MongoStatus
    extends java.lang.Object
    implements com.mongodb.event.ServerMonitorListener
    • Constructor Detail

      • MongoStatus

        public MongoStatus​(@NotNull
                           @NotNull com.mongodb.MongoClient client,
                           @NotNull
                           @NotNull java.lang.String dbName)
    • Method Detail

      • checkVersion

        public void checkVersion()
      • isMajorityReadConcernSupported

        public boolean isMajorityReadConcernSupported()
        Check if the majority read concern is supported by this storage engine. The fact that read concern is supported doesn't it can be used - it also has to be enabled.
        Returns:
        true if the majority read concern is supported
      • isMajorityReadConcernEnabled

        public boolean isMajorityReadConcernEnabled()
        Check if the majority read concern is enabled and can be used for queries.
        Returns:
        true if the majority read concern is enabled
      • getServerDetails

        @NotNull
        public @NotNull java.lang.String getServerDetails()
      • getVersion

        @NotNull
        public @NotNull java.lang.String getVersion()
      • serverHearbeatStarted

        public void serverHearbeatStarted​(com.mongodb.event.ServerHeartbeatStartedEvent event)
        Specified by:
        serverHearbeatStarted in interface com.mongodb.event.ServerMonitorListener
      • serverHeartbeatSucceeded

        public void serverHeartbeatSucceeded​(com.mongodb.event.ServerHeartbeatSucceededEvent event)
        Specified by:
        serverHeartbeatSucceeded in interface com.mongodb.event.ServerMonitorListener
      • serverHeartbeatFailed

        public void serverHeartbeatFailed​(com.mongodb.event.ServerHeartbeatFailedEvent event)
        Specified by:
        serverHeartbeatFailed in interface com.mongodb.event.ServerMonitorListener