public class AsyncRedisConnectionPoolManager extends Object implements AsyncPoolMemberManager<AsyncRedisConnection>
AsyncObjectPool can be used to create a pool of
AsyncRedisConnection. This is used internally by AsyncRedisFactory to create a connection pool when
requested for a redis server.| Constructor and Description |
|---|
AsyncRedisConnectionPoolManager(AsyncSocketTransportFactory pconnectionFactory,
RedisServerInfo predisServerInfo,
Executor pexecutor,
int pshutdownDelay)
Creates a Pool Member manager with necessary information to create
AsyncRedisConnection objects. |
AsyncRedisConnectionPoolManager(RedisServerInfo pserverInfo,
Executor pexecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeReturn(AsyncRedisConnection con)
Called before a member is returned back to the pool.
|
AsyncRedisConnection |
createObject()
Creates an AsyncRedisConnection.
|
void |
destroyObject(AsyncRedisConnection con)
Called when an Object is removed from the pool because the pool size is reduced due to a setPoolSize call.
|
void |
onBorrow(AsyncRedisConnection con)
Called when a borrowed member Object is handed over to the caller.
|
public AsyncRedisConnectionPoolManager(AsyncSocketTransportFactory pconnectionFactory, RedisServerInfo predisServerInfo, Executor pexecutor, int pshutdownDelay)
AsyncRedisConnection objects.pconnectionFactory - Connection Factory to use to create AsyncSocketTransportpredisServerInfo - Server Info containing redis server and portpexecutor - Executor to use in case Async Borrow is requiredpshutdownDelay - Shut Down delay to use when freeing Objectspublic AsyncRedisConnectionPoolManager(RedisServerInfo pserverInfo, Executor pexecutor)
public AsyncRedisConnection createObject()
createObject in interface AsyncPoolMemberManager<AsyncRedisConnection>public void destroyObject(AsyncRedisConnection con)
AsyncPoolMemberManagerdestroyObject in interface AsyncPoolMemberManager<AsyncRedisConnection>public void onBorrow(AsyncRedisConnection con)
AsyncPoolMemberManageronBorrow in interface AsyncPoolMemberManager<AsyncRedisConnection>con - Borrowed itempublic void beforeReturn(AsyncRedisConnection con)
AsyncPoolMemberManagerbeforeReturn in interface AsyncPoolMemberManager<AsyncRedisConnection>con - item being returnedCopyright © 2013- Suresh Mahalingam. All Rights Reserved.