org.apache.blur.thrift
Class BlurClientManager
java.lang.Object
org.apache.blur.thrift.BlurClientManager
public class BlurClientManager
- extends Object
Method Summary |
static void |
close(Blur.Client client)
|
static
|
execute(Connection connection,
AbstractCommand<CLIENT,T> command)
|
static
|
execute(Connection connection,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
|
static
|
execute(List<Connection> connections,
AbstractCommand<CLIENT,T> command)
|
static
|
execute(List<Connection> connections,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
|
static
|
execute(String connectionStr,
AbstractCommand<CLIENT,T> command)
|
static
|
execute(String connectionStr,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
|
static ClientPool |
getClientPool()
|
static List<Connection> |
getConnections(String connectionStr)
|
static Blur.Client |
newClient(Connection connection)
|
static void |
returnClient(Connection connection,
java.util.concurrent.atomic.AtomicReference<Blur.Client> client)
|
static void |
returnClient(Connection connection,
Blur.Client client)
|
static void |
setClientPool(ClientPool clientPool)
|
static void |
sleep(long backOffTime,
long maxBackOffTime,
int retry,
int maxRetries)
|
MAX_RETRIES
public static final int MAX_RETRIES
- See Also:
- Constant Field Values
BACK_OFF_TIME
public static final long BACK_OFF_TIME
MAX_BACK_OFF_TIME
public static final long MAX_BACK_OFF_TIME
BlurClientManager
public BlurClientManager()
setClientPool
public static void setClientPool(ClientPool clientPool)
getClientPool
public static ClientPool getClientPool()
execute
public static <CLIENT,T> T execute(Connection connection,
AbstractCommand<CLIENT,T> command)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
execute
public static <CLIENT,T> T execute(Connection connection,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
execute
public static <CLIENT,T> T execute(List<Connection> connections,
AbstractCommand<CLIENT,T> command)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
execute
public static <CLIENT,T> T execute(List<Connection> connections,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
sleep
public static void sleep(long backOffTime,
long maxBackOffTime,
int retry,
int maxRetries)
execute
public static <CLIENT,T> T execute(String connectionStr,
AbstractCommand<CLIENT,T> command,
int maxRetries,
long backOffTime,
long maxBackOffTime)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
getConnections
public static List<Connection> getConnections(String connectionStr)
execute
public static <CLIENT,T> T execute(String connectionStr,
AbstractCommand<CLIENT,T> command)
throws BlurException,
TException,
IOException
- Throws:
BlurException
TException
IOException
returnClient
public static void returnClient(Connection connection,
java.util.concurrent.atomic.AtomicReference<Blur.Client> client)
returnClient
public static void returnClient(Connection connection,
Blur.Client client)
close
public static void close(Blur.Client client)
newClient
public static Blur.Client newClient(Connection connection)
throws TTransportException,
IOException
- Throws:
TTransportException
IOException
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.