@Deprecated public class DBPortPool extends SimplePool<DBPort>
| Modifier and Type | Class and Description |
|---|---|
static class |
DBPortPool.ConnectionWaitTimeOut
Deprecated.
This class will be dropped in 3.x versions.
Please catch
MongoTimeoutException instead. |
static class |
DBPortPool.NoMoreConnection
Deprecated.
This class will be dropped in 3.x versions.
Please catch
MongoClientException instead. |
static class |
DBPortPool.SemaphoresOut
Deprecated.
This class will be dropped in 3.x versions.
Please catch
MongoWaitQueueFullException instead. |
| Modifier and Type | Field and Description |
|---|---|
(package private) ServerAddress |
_addr
Deprecated.
|
(package private) MongoOptions |
_options
Deprecated.
|
private java.util.concurrent.Semaphore |
_waitingSem
Deprecated.
|
_avail, _name, _out, _size| Constructor and Description |
|---|
DBPortPool(ServerAddress addr,
MongoOptions options)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(DBPort p)
Deprecated.
Override this if you need to do any cleanup
|
protected DBPort |
createNew()
Deprecated.
Creates a new object of this pool's type.
|
DBPort |
get()
Deprecated.
Gets an object from the pool - will block if none are available
|
java.lang.String |
getHost()
Deprecated.
|
int |
getPort()
Deprecated.
|
ServerAddress |
getServerAddress()
Deprecated.
|
close, done, get, getAvailable, getInUse, getMaxSize, getName, getTotal, pick, remove, toStringfinal MongoOptions _options
private final java.util.concurrent.Semaphore _waitingSem
final ServerAddress _addr
DBPortPool(ServerAddress addr, MongoOptions options)
public java.lang.String getHost()
public int getPort()
public DBPort get()
SimplePoolget in class SimplePool<DBPort>MongoExceptionpublic void cleanup(DBPort p)
SimplePoolcleanup in class SimplePool<DBPort>p - the object that was addedprotected DBPort createNew()
SimplePoolcreateNew in class SimplePool<DBPort>public ServerAddress getServerAddress()