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