W - Type of object that is written to the client using this holder.R - Type of object that is read from the the client using this holder.public abstract class IdleConnectionsHolder<W,R>
extends java.lang.Object
PooledConnection used by PooledConnectionProvider| Constructor and Description |
|---|
IdleConnectionsHolder() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
add(PooledConnection<R,W> toAdd)
Adds the passed connection to this holder.
|
abstract rx.Observable<PooledConnection<R,W>> |
peek()
Creates a stream of idle connections where every item sent on to the stream is NOT removed from the
underlying idle connections pool.
|
abstract rx.Observable<PooledConnection<R,W>> |
poll()
Creates a stream of idle connections where every item sent on to the stream is removed from the underlying
idle connections pool.
|
rx.Observable<PooledConnection<R,W>> |
pollThisEventLoopConnections()
Creates a stream of idle connections where every item sent on to the stream is removed from the underlying
idle connections pool.
|
abstract boolean |
remove(PooledConnection<R,W> toRemove)
Removes the passed connection from this holder.
|
public abstract rx.Observable<PooledConnection<R,W>> poll()
public rx.Observable<PooledConnection<R,W>> pollThisEventLoopConnections()
EventLoop known to this holder.
Otherwise, it should return an empty stream.public abstract rx.Observable<PooledConnection<R,W>> peek()
remove(PooledConnection) must
be called for that connection.public abstract void add(PooledConnection<R,W> toAdd)
toAdd - Connection to add.public abstract boolean remove(PooledConnection<R,W> toRemove)
toRemove - Connection to remove.