com.hazelcast.client.impl.protocol.task.mapreduce
Class AbstractMapReduceTask<Parameters>

java.lang.Object
  extended by com.hazelcast.client.impl.protocol.task.AbstractMessageTask<P>
      extended by com.hazelcast.client.impl.protocol.task.AbstractCallableMessageTask<Parameters>
          extended by com.hazelcast.client.impl.protocol.task.mapreduce.AbstractMapReduceTask<Parameters>
All Implemented Interfaces:
SecureRequest, MessageTask, ExecutionCallback, PartitionSpecificRunnable, Runnable
Direct Known Subclasses:
MapReduceForCustomMessageTask, MapReduceForListMessageTask, MapReduceForMapMessageTask, MapReduceForMultiMapMessageTask, MapReduceForSetMessageTask

public abstract class AbstractMapReduceTask<Parameters>
extends AbstractCallableMessageTask<Parameters>
implements ExecutionCallback


Field Summary
 
Fields inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
clientEngine, clientMessage, connection, endpoint, endpointManager, logger, nodeEngine, parameters, serializationService
 
Constructor Summary
AbstractMapReduceTask(ClientMessage clientMessage, Node node, Connection connection)
           
 
Method Summary
protected  ClientMessage call()
           
protected abstract  int getChunkSize()
           
protected abstract  CombinerFactory getCombinerFactory()
           
protected abstract  String getJobId()
           
protected abstract  Collection getKeys()
           
protected abstract  KeyValueSource getKeyValueSource()
           
protected abstract  Mapper getMapper()
           
 String getMethodName()
          Used for SecurityInterceptor Method name which called via a distributedObject for map.put, methodName will be 'put' For requests which do not produced via a distributedObject should return null, for example internal client.
 Object[] getParameters()
          Used for SecurityInterceptor Parameters passed to the method by a distributedObject for map.put(key, value) parameters should be 'key' and 'value' parameters can be in binary or object form, underlying implementation will de-serialize lazily
protected abstract  KeyPredicate getPredicate()
           
protected abstract  ReducerFactory getReducerFactory()
           
 Permission getRequiredPermission()
           
 String getServiceName()
           
protected abstract  String getTopologyChangedStrategy()
           
 void onFailure(Throwable t)
          Called when an execution is completed with an error.
 void onResponse(Object response)
          Called when an execution is completed successfully.
 
Methods inherited from class com.hazelcast.client.impl.protocol.task.AbstractCallableMessageTask
processMessage
 
Methods inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
decodeClientMessage, getDistributedObjectName, getDistributedObjectType, getEndpoint, getPartitionId, getService, run, sendClientMessage, sendClientMessage, sendClientMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMapReduceTask

public AbstractMapReduceTask(ClientMessage clientMessage,
                             Node node,
                             Connection connection)
Method Detail

call

protected ClientMessage call()
Specified by:
call in class AbstractCallableMessageTask<Parameters>

getJobId

protected abstract String getJobId()

getChunkSize

protected abstract int getChunkSize()

getTopologyChangedStrategy

protected abstract String getTopologyChangedStrategy()

getKeyValueSource

protected abstract KeyValueSource getKeyValueSource()

getMapper

protected abstract Mapper getMapper()

getCombinerFactory

protected abstract CombinerFactory getCombinerFactory()

getReducerFactory

protected abstract ReducerFactory getReducerFactory()

getKeys

protected abstract Collection getKeys()

getPredicate

protected abstract KeyPredicate getPredicate()

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

getServiceName

public String getServiceName()
Specified by:
getServiceName in class AbstractMessageTask<Parameters>

getRequiredPermission

public Permission getRequiredPermission()
Specified by:
getRequiredPermission in interface SecureRequest

getMethodName

public String getMethodName()
Description copied from interface: SecureRequest
Used for SecurityInterceptor Method name which called via a distributedObject for map.put, methodName will be 'put' For requests which do not produced via a distributedObject should return null, for example internal client.

Specified by:
getMethodName in interface SecureRequest
Specified by:
getMethodName in class AbstractMessageTask<Parameters>
Returns:

getParameters

public Object[] getParameters()
Description copied from interface: SecureRequest
Used for SecurityInterceptor Parameters passed to the method by a distributedObject for map.put(key, value) parameters should be 'key' and 'value' parameters can be in binary or object form, underlying implementation will de-serialize lazily

Specified by:
getParameters in interface SecureRequest
Specified by:
getParameters in class AbstractMessageTask<Parameters>
Returns:


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