Class GlobalLockMetrics
java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
org.springframework.data.mongodb.monitor.GlobalLockMetrics
@ManagedResource(description="Global Lock Metrics")
public class GlobalLockMetrics
extends AbstractMonitor
JMX Metrics for Global Locks
- Author:
- Mark Pollack
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
double
double
double
Methods inherited from class org.springframework.data.mongodb.monitor.AbstractMonitor
getDb, getMongoClient, getServerStatus, hosts
-
Constructor Details
-
GlobalLockMetrics
public GlobalLockMetrics(com.mongodb.client.MongoClient mongoClient) - Parameters:
mongoClient
- must not be null.- Since:
- 2.2
-
-
Method Details
-
getTotalTime
@ManagedMetric(metricType=COUNTER, displayName="Total time") public double getTotalTime() -
getLockTime
@ManagedMetric(metricType=COUNTER, displayName="Lock time", unit="s") public double getLockTime() -
getLockTimeRatio
@ManagedMetric(metricType=GAUGE, displayName="Lock time") public double getLockTimeRatio() -
getCurrentQueueTotal
@ManagedMetric(metricType=GAUGE, displayName="Current Queue") public int getCurrentQueueTotal() -
getCurrentQueueReaders
@ManagedMetric(metricType=GAUGE, displayName="Reader Queue") public int getCurrentQueueReaders() -
getCurrentQueueWriters
@ManagedMetric(metricType=GAUGE, displayName="Writer Queue") public int getCurrentQueueWriters()
-