com.mongodb
Class DBPortPool
java.lang.Object
com.mongodb.util.SimplePool<DBPort>
com.mongodb.DBPortPool
class DBPortPool
- extends SimplePool<DBPort>
|
Method Summary |
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 |
(package private) void |
gotError(Exception e)
|
protected long |
memSize(DBPort p)
|
boolean |
ok(DBPort t)
callback to determine if an object is ok to be added back to the pool or used
will be called when something is put back into the queue and when it comes out |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_maxWaitTime
public final long _maxWaitTime
- See Also:
- Constant Field Values
_options
final MongoOptions _options
_addr
final InetSocketAddress _addr
_everWorked
boolean _everWorked
DBPortPool
DBPortPool(InetSocketAddress addr,
MongoOptions options)
memSize
protected long memSize(DBPort p)
get
public DBPort get()
- Description copied from class:
SimplePool
- Gets an object from the pool - will block if none are available
- Overrides:
get in class SimplePool<DBPort>
- Returns:
- An object from the pool
gotError
void gotError(Exception e)
ok
public boolean ok(DBPort t)
- Description copied from class:
SimplePool
- callback to determine if an object is ok to be added back to the pool or used
will be called when something is put back into the queue and when it comes out
- Overrides:
ok in class SimplePool<DBPort>
- Returns:
- true iff the object is ok to be added back to pool
createNew
protected DBPort createNew()
throws MongoInternalException
- Description copied from class:
SimplePool
- Creates a new object of this pool's type.
- Specified by:
createNew in class SimplePool<DBPort>
- Returns:
- the new object.
- Throws:
MongoInternalException