com.hazelcast.spi.impl
Class Response

java.lang.Object
  extended by com.hazelcast.spi.impl.Response
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable
Direct Known Subclasses:
CallTimeoutResponse, NormalResponse

public abstract class Response
extends Object
implements IdentifiedDataSerializable

A Response is a result of an Operation being executed. There are different types of responses:

  1. NormalResponse the result of a regular Operation result, e.g. Map.put
  2. BackupResponse the result of a completed Backup.


Field Summary
protected  long callId
           
protected  boolean urgent
           
 
Constructor Summary
Response()
           
Response(long callId, boolean urgent)
           
 
Method Summary
 long getCallId()
          Returns the call id of the operation this response belongs to.
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 boolean isUrgent()
          Check if this Response is an urgent response.
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
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.IdentifiedDataSerializable
getId
 

Field Detail

callId

protected long callId

urgent

protected boolean urgent
Constructor Detail

Response

public Response()

Response

public Response(long callId,
                boolean urgent)
Method Detail

isUrgent

public boolean isUrgent()
Check if this Response is an urgent response.

Returns:
true if urgent, false otherwise.

getCallId

public long getCallId()
Returns the call id of the operation this response belongs to.

Returns:
the call id.

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException


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