Class MongoStatus
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoStatus
-
- All Implemented Interfaces:
com.mongodb.event.ServerMonitorListener
,java.util.EventListener
public class MongoStatus extends java.lang.Object implements com.mongodb.event.ServerMonitorListener
-
-
Constructor Summary
Constructors Constructor Description MongoStatus(@NotNull com.mongodb.MongoClient client, @NotNull java.lang.String dbName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkVersion()
@NotNull java.lang.String
getServerDetails()
@NotNull java.lang.String
getVersion()
boolean
isMajorityReadConcernEnabled()
Check if the majority read concern is enabled and can be used for queries.boolean
isMajorityReadConcernSupported()
Check if the majority read concern is supported by this storage engine.void
serverHearbeatStarted(com.mongodb.event.ServerHeartbeatStartedEvent event)
void
serverHeartbeatFailed(com.mongodb.event.ServerHeartbeatFailedEvent event)
void
serverHeartbeatSucceeded(com.mongodb.event.ServerHeartbeatSucceededEvent event)
-
-
-
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 interfacecom.mongodb.event.ServerMonitorListener
-
serverHeartbeatSucceeded
public void serverHeartbeatSucceeded(com.mongodb.event.ServerHeartbeatSucceededEvent event)
- Specified by:
serverHeartbeatSucceeded
in interfacecom.mongodb.event.ServerMonitorListener
-
serverHeartbeatFailed
public void serverHeartbeatFailed(com.mongodb.event.ServerHeartbeatFailedEvent event)
- Specified by:
serverHeartbeatFailed
in interfacecom.mongodb.event.ServerMonitorListener
-
-