com.hazelcast.map.impl.client
Class MapPutRequest

java.lang.Object
  extended by com.hazelcast.client.impl.client.ClientRequest
      extended by com.hazelcast.client.impl.client.PartitionClientRequest
          extended by com.hazelcast.client.impl.client.KeyBasedClientRequest
              extended by com.hazelcast.map.impl.client.MapPutRequest
All Implemented Interfaces:
SecureRequest, Portable, VersionedPortable
Direct Known Subclasses:
MapPutIfAbsentRequest, MapPutTransientRequest, MapReplaceIfSameRequest, MapReplaceRequest, MapSetRequest, MapTryPutRequest

public class MapPutRequest
extends KeyBasedClientRequest
implements Portable, SecureRequest


Field Summary
protected  boolean async
           
protected  Data key
           
protected  String name
           
protected  long startTime
           
protected  long threadId
           
protected  long ttl
           
protected  Data value
           
 
Fields inherited from class com.hazelcast.client.impl.client.ClientRequest
callId, clientEngine, endpoint, operationService, serializationService, service
 
Constructor Summary
MapPutRequest()
           
MapPutRequest(String name, Data key, Data value, long threadId)
           
MapPutRequest(String name, Data key, Data value, long threadId, long ttl)
           
 
Method Summary
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.
 int getClassId()
          Returns class identifier for this portable class.
 String getDistributedObjectName()
          Used for SecurityInterceptor
 int getFactoryId()
          Returns PortableFactory id for this portable class
protected  Object getKey()
           
 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
 Permission getRequiredPermission()
           
 String getServiceName()
           
protected  Operation prepareOperation()
           
 void read(PortableReader reader)
           
 void setAsAsync()
           
 void write(PortableWriter writer)
           
 
Methods inherited from class com.hazelcast.client.impl.client.KeyBasedClientRequest
getPartition
 
Methods inherited from class com.hazelcast.client.impl.client.PartitionClientRequest
afterResponse, filter, getReplicaIndex, process
 
Methods inherited from class com.hazelcast.client.impl.client.ClientRequest
getCallId, getClassVersion, getClientEngine, getDistributedObjectType, getEndpoint, getService, isSingleConnection, readPortable, setCallId, setClientEngine, setEndpoint, setOperationService, setSerializationService, setService, setSingleConnection, writePortable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.nio.serialization.Portable
readPortable, writePortable
 
Methods inherited from interface com.hazelcast.client.impl.client.SecureRequest
getDistributedObjectType
 

Field Detail

key

protected Data key

value

protected Data value

name

protected String name

threadId

protected long threadId

ttl

protected long ttl

startTime

protected transient long startTime

async

protected boolean async
Constructor Detail

MapPutRequest

public MapPutRequest()

MapPutRequest

public MapPutRequest(String name,
                     Data key,
                     Data value,
                     long threadId,
                     long ttl)

MapPutRequest

public MapPutRequest(String name,
                     Data key,
                     Data value,
                     long threadId)
Method Detail

getFactoryId

public int getFactoryId()
Description copied from interface: Portable
Returns PortableFactory id for this portable class

Specified by:
getFactoryId in interface Portable
Returns:
factory id

getClassId

public int getClassId()
Description copied from interface: Portable
Returns class identifier for this portable class. Class id should be unique per PortableFactory.

Specified by:
getClassId in interface Portable
Returns:
class id

getKey

protected Object getKey()
Specified by:
getKey in class KeyBasedClientRequest

beforeProcess

protected void beforeProcess()
Description copied from class: PartitionClientRequest
Called on node side, before starting any operation.

Overrides:
beforeProcess in class PartitionClientRequest

beforeResponse

protected void beforeResponse()
Description copied from class: PartitionClientRequest
Called on node side, after process is run and right before sending the response to the client.

Overrides:
beforeResponse in class PartitionClientRequest

prepareOperation

protected Operation prepareOperation()
Specified by:
prepareOperation in class PartitionClientRequest

setAsAsync

public void setAsAsync()

getServiceName

public String getServiceName()
Specified by:
getServiceName in class ClientRequest

write

public void write(PortableWriter writer)
           throws IOException
Overrides:
write in class ClientRequest
Throws:
IOException

read

public void read(PortableReader reader)
          throws IOException
Overrides:
read in class ClientRequest
Throws:
IOException

getRequiredPermission

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

getDistributedObjectName

public String getDistributedObjectName()
Description copied from interface: SecureRequest
Used for SecurityInterceptor

Specified by:
getDistributedObjectName in interface SecureRequest
Overrides:
getDistributedObjectName in class ClientRequest
Returns:

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
Overrides:
getMethodName in class ClientRequest
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
Overrides:
getParameters in class ClientRequest
Returns:


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