|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mongodb.util.SimplePool<DBPort>
com.mongodb.DBPortPool
public class DBPortPool
This class is NOT part of the public API. Be prepared for non-binary compatible changes in minor releases.
| Nested Class Summary | |
|---|---|
static class |
DBPortPool.ConnectionWaitTimeOut
|
static class |
DBPortPool.NoMoreConnection
|
static class |
DBPortPool.SemaphoresOut
|
| Field Summary |
|---|
| Fields inherited from class com.mongodb.util.SimplePool |
|---|
_avail, _name, _out, _size |
| Method Summary | |
|---|---|
void |
cleanup(DBPort p)
override this if you need to do any cleanup |
protected DBPort |
createNew()
Creates a new object of this pool's type. |
DBPort |
get()
Gets an object from the pool - will block if none are available |
String |
getHost()
Gets the host that this connection pool is connecting to. |
int |
getPort()
Gets the port that this connection pool is connecting to. |
ServerAddress |
getServerAddress()
|
ConnectionPoolStatisticsBean |
getStatistics()
Gets the statistics for this connection pool. |
protected long |
memSize(DBPort p)
|
protected int |
pick(int recommended,
boolean couldCreate)
Pick a member of _avail. |
| Methods inherited from class com.mongodb.util.SimplePool |
|---|
close, done, get, getAvailable, getInUse, getMaxSize, getName, getTotal, remove, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.mongodb.MongoConnectionPoolMXBean |
|---|
getMaxSize, getName |
| Method Detail |
|---|
public String getHost()
MongoConnectionPoolMXBean
getHost in interface MongoConnectionPoolMXBeanpublic int getPort()
MongoConnectionPoolMXBean
getPort in interface MongoConnectionPoolMXBeanpublic ConnectionPoolStatisticsBean getStatistics()
MongoConnectionPoolMXBean
getStatistics in interface MongoConnectionPoolMXBeanprotected long memSize(DBPort p)
protected int pick(int recommended,
boolean couldCreate)
SimplePool_avail. This method is called with a lock held on _avail, so it may be used safely.
pick in class SimplePool<DBPort>recommended - the recommended member to choose.couldCreate - true if there is room in the pool to create a new object
public DBPort get()
SimplePool
get in class SimplePool<DBPort>MongoExceptionpublic void cleanup(DBPort p)
SimplePool
cleanup in class SimplePool<DBPort>protected DBPort createNew()
SimplePool
createNew in class SimplePool<DBPort>public ServerAddress getServerAddress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||