public class ClientInvocation extends Object implements Runnable, ExecutionCallback
Modifier and Type | Field and Description |
---|---|
protected ClientInvocationFuture |
clientInvocationFuture |
static long |
RETRY_WAIT_TIME_IN_SECONDS |
protected static int |
UNASSIGNED_PARTITION |
Modifier | Constructor and Description |
---|---|
|
ClientInvocation(HazelcastClientInstanceImpl client,
ClientMessage clientMessage) |
|
ClientInvocation(HazelcastClientInstanceImpl client,
ClientMessage clientMessage,
Address address) |
|
ClientInvocation(HazelcastClientInstanceImpl client,
ClientMessage clientMessage,
Connection connection) |
|
ClientInvocation(HazelcastClientInstanceImpl client,
ClientMessage clientMessage,
int partitionId) |
protected |
ClientInvocation(HazelcastClientInstanceImpl client,
ClientMessage clientMessage,
int partitionId,
Address address,
Connection connection) |
Modifier and Type | Method and Description |
---|---|
ClientMessage |
getClientMessage() |
EventHandler |
getEventHandler() |
int |
getHeartBeatInterval() |
int |
getPartitionId() |
ClientConnection |
getSendConnection() |
ClientConnection |
getSendConnectionOrWait() |
ClientInvocationFuture |
invoke() |
ClientInvocationFuture |
invokeUrgent() |
static boolean |
isRetryable(Throwable t) |
boolean |
isUrgent() |
void |
notify(ClientMessage clientMessage) |
void |
notifyException(Throwable exception) |
void |
onFailure(Throwable t)
Called when an execution is completed with an error.
|
void |
onResponse(Object response)
Called when an execution is completed successfully.
|
void |
run() |
void |
setBypassHeartbeatCheck(boolean bypassHeartbeatCheck) |
void |
setEventHandler(EventHandler handler) |
void |
setSendConnection(ClientConnection connection) |
boolean |
shouldBypassHeartbeatCheck() |
protected boolean |
shouldRetry() |
public static final long RETRY_WAIT_TIME_IN_SECONDS
protected static final int UNASSIGNED_PARTITION
protected ClientInvocationFuture clientInvocationFuture
protected ClientInvocation(HazelcastClientInstanceImpl client, ClientMessage clientMessage, int partitionId, Address address, Connection connection)
public ClientInvocation(HazelcastClientInstanceImpl client, ClientMessage clientMessage)
public ClientInvocation(HazelcastClientInstanceImpl client, ClientMessage clientMessage, int partitionId)
public ClientInvocation(HazelcastClientInstanceImpl client, ClientMessage clientMessage, Address address)
public ClientInvocation(HazelcastClientInstanceImpl client, ClientMessage clientMessage, Connection connection)
public int getPartitionId()
public ClientMessage getClientMessage()
public ClientInvocationFuture invoke()
public ClientInvocationFuture invokeUrgent()
public void notify(ClientMessage clientMessage)
public void notifyException(Throwable exception)
protected boolean shouldRetry()
public EventHandler getEventHandler()
public void setEventHandler(EventHandler handler)
public int getHeartBeatInterval()
public boolean shouldBypassHeartbeatCheck()
public boolean isUrgent()
public void setBypassHeartbeatCheck(boolean bypassHeartbeatCheck)
public void setSendConnection(ClientConnection connection)
public ClientConnection getSendConnectionOrWait() throws InterruptedException
InterruptedException
public ClientConnection getSendConnection()
public static boolean isRetryable(Throwable t)
public void onResponse(Object response)
ExecutionCallback
onResponse
in interface ExecutionCallback
response
- the result of the successful executionpublic void onFailure(Throwable t)
ExecutionCallback
onFailure
in interface ExecutionCallback
t
- the exception that is thrownCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.