public abstract class Response extends Object implements IdentifiedDataSerializable
Response is a result of an Operation being executed.
There are different types of responses:
NormalResponse the result of a regular Operation result, e.g. Map.put
BackupAckResponse the result of a completed Backup.
| Modifier and Type | Field and Description |
|---|---|
protected long |
callId |
static int |
OFFSET_CALL_ID |
static int |
OFFSET_IDENTIFIED |
static int |
OFFSET_SERIALIZER_TYPE_ID |
static int |
OFFSET_TYPE_FACTORY_ID |
static int |
OFFSET_TYPE_ID |
static int |
OFFSET_URGENT |
static int |
RESPONSE_SIZE_IN_BYTES |
protected boolean |
urgent |
| Constructor and Description |
|---|
Response() |
Response(long callId,
boolean urgent) |
| Modifier and Type | Method and Description |
|---|---|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdpublic static final int OFFSET_SERIALIZER_TYPE_ID
public static final int OFFSET_IDENTIFIED
public static final int OFFSET_TYPE_FACTORY_ID
public static final int OFFSET_TYPE_ID
public static final int OFFSET_CALL_ID
public static final int OFFSET_URGENT
public static final int RESPONSE_SIZE_IN_BYTES
protected long callId
protected boolean urgent
public boolean isUrgent()
public long getCallId()
public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionCopyright © 2017. All Rights Reserved.