org.springframework.data.document.mongodb.monitor
Class AbstractMonitor
java.lang.Object
org.springframework.data.document.mongodb.monitor.AbstractMonitor
- Direct Known Subclasses:
- AssertMetrics, BackgroundFlushingMetrics, BtreeIndexCounters, ConnectionMetrics, GlobalLockMetrics, MemoryMetrics, OperationCounters, ServerInfo
public abstract class AbstractMonitor
- extends java.lang.Object
Base class to encapsulate common configuration settings when connecting to a database
- Author:
- Mark Pollack
Field Summary |
protected com.mongodb.Mongo |
mongo
|
Method Summary |
com.mongodb.DB |
getDb(java.lang.String databaseName)
|
com.mongodb.CommandResult |
getServerStatus()
|
void |
setPassword(java.lang.String password)
Sets the password to use to authenticate with the Mongo database. |
void |
setUsername(java.lang.String username)
Sets the username to use to connect to the Mongo database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mongo
protected com.mongodb.Mongo mongo
AbstractMonitor
public AbstractMonitor()
setUsername
public void setUsername(java.lang.String username)
- Sets the username to use to connect to the Mongo database
- Parameters:
username
- The username to use
setPassword
public void setPassword(java.lang.String password)
- Sets the password to use to authenticate with the Mongo database.
- Parameters:
password
- The password to use
getServerStatus
public com.mongodb.CommandResult getServerStatus()
getDb
public com.mongodb.DB getDb(java.lang.String databaseName)
Copyright © 2011. All Rights Reserved.