com.hazelcast.client.impl.protocol.task
Class AbstractPartitionMessageTask<P>

java.lang.Object
  extended by com.hazelcast.client.impl.protocol.task.AbstractMessageTask<P>
      extended by com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask<P>
All Implemented Interfaces:
SecureRequest, MessageTask, ExecutionCallback, PartitionSpecificRunnable, Runnable
Direct Known Subclasses:
AbstractCacheMessageTask, AbstractMapPutMessageTask, AtomicLongAddAndGetMessageTask, AtomicLongAlterAndGetMessageTask, AtomicLongAlterMessageTask, AtomicLongApplyMessageTask, AtomicLongCompareAndSetMessageTask, AtomicLongDecrementAndGetMessageTask, AtomicLongGetAndAddMessageTask, AtomicLongGetAndAlterMessageTask, AtomicLongGetAndIncrementMessageTask, AtomicLongGetAndSetMessageTask, AtomicLongGetMessageTask, AtomicLongIncrementAndGetMessageTask, AtomicLongSetMessageTask, AtomicRefenceContainsMessageTask, AtomicReferenceAlterAndGetMessageTask, AtomicReferenceAlterMessageTask, AtomicReferenceApplyMessageTask, AtomicReferenceClearMessageTask, AtomicReferenceCompareAndSetMessageTask, AtomicReferenceGetAndAlterMessageTask, AtomicReferenceGetAndSetMessageTask, AtomicReferenceGetMessageTask, AtomicReferenceIsNullMessageTask, AtomicReferenceSetAndGetMessageTask, AtomicReferenceSetMessageTask, CacheCreateConfigMessageTask, CacheDestroyMessageTask, ConditionAwaitMessageTask, ConditionBeforeAwaitMessageTask, ConditionSignalAllMessageTask, ConditionSignalMessageTask, CountDownLatchAwaitMessageTask, CountDownLatchCountDownMessageTask, CountDownLatchGetCountMessageTask, CountDownLatchTrySetCountMessageTask, ListAddAllMessageTask, ListAddAllWithIndexMessageTask, ListAddMessageTask, ListAddWithIndexMessageTask, ListClearMessageTask, ListCompareAndRemoveAllMessageTask, ListCompareAndRetainAllMessageTask, ListContainsAllMessageTask, ListContainsMessageTask, ListGetAllMessageTask, ListGetMessageTask, ListIndexOfMessageTask, ListIsEmptyMessageTask, ListIteratorMessageTask, ListLastIndexOfMessageTask, ListRemoveMessageTask, ListRemoveWithIndexMessageTask, ListSetMessageTask, ListSizeMessageTask, ListSubMessageTask, LockForceUnlockMessageTask, LockGetLockCountMessageTask, LockGetRemainingLeaseTimeMessageTask, LockIsLockedByCurrentThreadMessageTask, LockIsLockedMessageTask, LockLockMessageTask, LockTryLockMessageTask, LockUnlockMessagetask, MapContainsKeyMessageTask, MapDeleteMessageTask, MapEvictMessageTask, MapExecuteOnKeyMessageTask, MapForceUnlockMessageTask, MapGetAsyncMessageTask, MapGetEntryViewMessageTask, MapGetMessageTask, MapIsLockedMessageTask, MapLockMessageTask, MapRemoveAsyncMessageTask, MapRemoveIfSameMessageTask, MapRemoveMessageTask, MapSubmitToKeyMessageTask, MapTryLockMessageTask, MapTryRemoveMessageTask, MapUnlockMessageTask, MultiMapContainsEntryMessageTask, MultiMapContainsKeyMessageTask, MultiMapCountMessageTask, MultiMapForceUnlockMessageTask, MultiMapGetMessageTask, MultiMapIsLockedMessageTask, MultiMapLockMessageTask, MultiMapPutMessageTask, MultiMapRemoveEntryMessageTask, MultiMapRemoveMessageTask, MultiMapTryLockMessageTask, MultiMapUnlockMessageTask, MultiMapValueCountMessageTask, QueueAddAllMessageTask, QueueClearMessageTask, QueueCompareAndRemoveAllMessageTask, QueueCompareAndRetainAllMessageTask, QueueContainsAllMessageTask, QueueContainsMessageTask, QueueDrainMaxSizeMessageTask, QueueDrainMessageTask, QueueIsEmptyMessageTask, QueueIteratorMessageTask, QueueOfferMessageTask, QueuePeekMessageTask, QueuePollMessageTask, QueuePutMessageTask, QueueRemainingCapacityMessageTask, QueueRemoveMessageTask, QueueSizeMessageTask, QueueTakeMessageTask, SemaphoreAcquireMessageTask, SemaphoreAvailablePermitsMessageTasks, SemaphoreDrainPermitsMessageTask, SemaphoreInitMessageTask, SemaphoreReducePermitsMessageTask, SemaphoreReleaseMessageTask, SemaphoreTryAcquireMessageTask, SetAddAllMessageTask, SetAddMessageTask, SetClearMessageTask, SetCompareAndRemoveAllMessageTask, SetCompareAndRetainAllMessageTask, SetContainsAllMessageTask, SetContainsMessageTask, SetGetAllMessageTask, SetIsEmptyMessageTask, SetRemoveMessageTask, SetSizeMessageTask, TopicPublishMessageTask, XAFinalizeTransactionMessageTask

public abstract class AbstractPartitionMessageTask<P>
extends AbstractMessageTask<P>
implements ExecutionCallback

AbstractPartitionMessageTask


Field Summary
 
Fields inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
clientEngine, clientMessage, connection, endpoint, endpointManager, logger, nodeEngine, parameters, serializationService
 
Constructor Summary
protected AbstractPartitionMessageTask(ClientMessage clientMessage, Node node, Connection connection)
           
 
Method Summary
protected  void afterResponse()
          Called on node side, after sending the response to the client.
protected  void beforeProcess()
          Called on node side, before starting any operation.
protected  void beforeResponse()
          Called on node side, after process is run and right before sending the response to the client.
protected  ClientMessage encodeResponse(Object response)
           
 void onFailure(Throwable t)
          Called when an execution is completed with an error.
 void onResponse(Object response)
          Called when an execution is completed successfully.
protected abstract  Operation prepareOperation()
           
 void processMessage()
           
 
Methods inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
decodeClientMessage, getDistributedObjectName, getDistributedObjectType, getEndpoint, getMethodName, getParameters, getPartitionId, getService, getServiceName, run, sendClientMessage, sendClientMessage, sendClientMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.client.impl.client.SecureRequest
getRequiredPermission
 

Constructor Detail

AbstractPartitionMessageTask

protected AbstractPartitionMessageTask(ClientMessage clientMessage,
                                       Node node,
                                       Connection connection)
Method Detail

beforeProcess

protected void beforeProcess()
Called on node side, before starting any operation.


beforeResponse

protected void beforeResponse()
Called on node side, after process is run and right before sending the response to the client.


afterResponse

protected void afterResponse()
Called on node side, after sending the response to the client.


processMessage

public final void processMessage()
Specified by:
processMessage in class AbstractMessageTask<P>

prepareOperation

protected abstract Operation prepareOperation()

encodeResponse

protected ClientMessage encodeResponse(Object response)

onResponse

public void onResponse(Object response)
Description copied from interface: ExecutionCallback
Called when an execution is completed successfully.

Specified by:
onResponse in interface ExecutionCallback
Parameters:
response - the result of the successful execution

onFailure

public void onFailure(Throwable t)
Description copied from interface: ExecutionCallback
Called when an execution is completed with an error.

Specified by:
onFailure in interface ExecutionCallback
Parameters:
t - the exception that is thrown


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.