org.apache.blur.thrift
Class AsyncClientPool

java.lang.Object
  extended by org.apache.blur.thrift.AsyncClientPool

public class AsyncClientPool
extends Object


Field Summary
static int DEFAULT_CONNECTION_TIMEOUT
           
static int DEFAULT_MAX_CONNECTIONS_PER_HOST
           
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
AsyncClientPool()
           
AsyncClientPool(int maxConnectionsPerHost, int connectionTimeout)
           
 
Method Summary
 void close()
           
<T> T
getClient(Class<T> asyncIfaceClass, String connectionStr)
          Gets a client instance that implements the AsyncIface interface that connects to the given connection string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

DEFAULT_MAX_CONNECTIONS_PER_HOST

public static final int DEFAULT_MAX_CONNECTIONS_PER_HOST
See Also:
Constant Field Values

DEFAULT_CONNECTION_TIMEOUT

public static final int DEFAULT_CONNECTION_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

AsyncClientPool

public AsyncClientPool()
                throws IOException
Throws:
IOException

AsyncClientPool

public AsyncClientPool(int maxConnectionsPerHost,
                       int connectionTimeout)
                throws IOException
Throws:
IOException
Method Detail

close

public void close()

getClient

public <T> T getClient(Class<T> asyncIfaceClass,
                       String connectionStr)
Gets a client instance that implements the AsyncIface interface that connects to the given connection string.

Type Parameters:
T -
Parameters:
asyncIfaceClass - the AsyncIface interface to pool.
connectionStr - the connection string.
Returns:
the client instance.


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.