public class DBPortPool extends SimplePool<DBPort>
| Modifier and Type | Class and Description |
|---|---|
static class |
DBPortPool.ConnectionWaitTimeOut |
static class |
DBPortPool.NoMoreConnection |
static class |
DBPortPool.SemaphoresOut |
_avail, _name, _out, _size| Modifier and Type | Method and Description |
|---|---|
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() |
int |
getPort() |
ServerAddress |
getServerAddress() |
ConnectionPoolStatisticsBean |
getStatistics() |
protected long |
memSize(DBPort p) |
protected int |
pick(int recommended,
boolean couldCreate)
Pick a member of
_avail. |
close, done, get, getAvailable, getInUse, getMaxSize, getName, getTotal, remove, toStringpublic String getHost()
public int getPort()
public ConnectionPoolStatisticsBean getStatistics()
protected 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 objectpublic DBPort get()
SimplePoolget in class SimplePool<DBPort>MongoExceptionpublic void cleanup(DBPort p)
SimplePoolcleanup in class SimplePool<DBPort>protected DBPort createNew()
SimplePoolcreateNew in class SimplePool<DBPort>public ServerAddress getServerAddress()