public class

TestConnectionPool

extends Object
implements ConnectionPool<CL>
java.lang.Object
   ↳ com.netflix.astyanax.test.TestConnectionPool

Summary

Public Constructors
TestConnectionPool()
Public Methods
boolean addHost(Host host, boolean refresh)
Add a host to the connection pool.
<R> OperationResult<R> executeWithFailover(Operation<TestClient, R> op, RetryPolicy retry)
List<HostConnectionPool<TestClient>> getActivePools()
Return list of active hosts on which connections can be created
HostConnectionPool<TestClient> getHostPool(Host host)
Return an immutable connection pool for this host
Map<BigIntegerList<Host>> getHosts()
boolean hasHost(Host host)
Return true if host is contained within the connection pool
boolean isHostUp(Host host)
Return true if the host is up
boolean removeHost(Host host, boolean refresh)
Remove a host from the connection pool.
void setHosts(Map<BigIntegerList<Host>> ring)
Sets the complete set of hosts keyed by token.
void shutdown()
Shut down the connection pool and terminate all existing connections
void start()
Setup the connection pool and start any maintenance threads
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.connectionpool.ConnectionPool

Public Constructors

public TestConnectionPool ()

Public Methods

public boolean addHost (Host host, boolean refresh)

Add a host to the connection pool.

public OperationResult<R> executeWithFailover (Operation<TestClient, R> op, RetryPolicy retry)

public List<HostConnectionPool<TestClient>> getActivePools ()

Return list of active hosts on which connections can be created

public HostConnectionPool<TestClient> getHostPool (Host host)

Return an immutable connection pool for this host

public Map<BigIntegerList<Host>> getHosts ()

public boolean hasHost (Host host)

Return true if host is contained within the connection pool

public boolean isHostUp (Host host)

Return true if the host is up

public boolean removeHost (Host host, boolean refresh)

Remove a host from the connection pool. Any pending connections will be allowed to complete

public void setHosts (Map<BigIntegerList<Host>> ring)

Sets the complete set of hosts keyed by token.

public void shutdown ()

Shut down the connection pool and terminate all existing connections

public void start ()

Setup the connection pool and start any maintenance threads