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
Field Summary |
protected com.mongodb.Mongo |
mongo
|
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(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 com.mongodb.CommandResult getServerStatus()
getDb
public com.mongodb.DB getDb(String databaseName)
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.