|
||||||||||
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()
|
int |
getPort()
|
ServerAddress |
getServerAddress()
|
ConnectionPoolStatisticsBean |
getStatistics()
|
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 |
Method Detail |
---|
public 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 object
public DBPort get()
SimplePool
get
in class SimplePool<DBPort>
MongoException
public 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 |