Spring Data Document

org.springframework.data.document.mongodb.monitor
Class AbstractMonitor

java.lang.Object
  extended by org.springframework.data.document.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  Mongo mongo
           
 
Constructor Summary
AbstractMonitor()
           
 
Method Summary
 DB getDb(String databaseName)
           
 CommandResult getServerStatus()
           
 void setPassword(String password)
          Sets the password to use to authenticate with the Mongo database.
 void setUsername(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
 

Field Detail

mongo

protected Mongo mongo
Constructor Detail

AbstractMonitor

public AbstractMonitor()
Method Detail

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)

Spring Data Document

Copyright © 2011. All Rights Reserved.