org.infinispan.client.hotrod.impl.transport.tcp
Class TransportObjectFactory

java.lang.Object
  extended by org.apache.commons.pool.BaseKeyedPoolableObjectFactory
      extended by org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory
All Implemented Interfaces:
org.apache.commons.pool.KeyedPoolableObjectFactory

public class TransportObjectFactory
extends org.apache.commons.pool.BaseKeyedPoolableObjectFactory

Since:
4.1
Author:
Mircea.Markus@jboss.com

Constructor Summary
TransportObjectFactory(TcpTransportFactory tcpTransportFactory, AtomicInteger topologyId, boolean pingOnStartup)
           
 
Method Summary
 void activateObject(Object key, Object obj)
           
 void destroyObject(Object key, Object obj)
           
 Object makeObject(Object key)
           
 void passivateObject(Object key, Object obj)
           
 boolean validateObject(Object key, Object obj)
          This will be called by the test thread when testWhileIdle==true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportObjectFactory

public TransportObjectFactory(TcpTransportFactory tcpTransportFactory,
                              AtomicInteger topologyId,
                              boolean pingOnStartup)
Method Detail

makeObject

public Object makeObject(Object key)
                  throws Exception
Specified by:
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Specified by:
makeObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
Throws:
Exception

validateObject

public boolean validateObject(Object key,
                              Object obj)
This will be called by the test thread when testWhileIdle==true.

Specified by:
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
validateObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory

destroyObject

public void destroyObject(Object key,
                          Object obj)
                   throws Exception
Specified by:
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
destroyObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
Throws:
Exception

activateObject

public void activateObject(Object key,
                           Object obj)
                    throws Exception
Specified by:
activateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
activateObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
Throws:
Exception

passivateObject

public void passivateObject(Object key,
                            Object obj)
                     throws Exception
Specified by:
passivateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
passivateObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
Throws:
Exception


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.