public class GridCacheQueryResponse extends GridCacheIdMessage implements GridCacheDeployable
cacheId
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
DIRECT_TYPE_SIZE
Constructor and Description |
---|
GridCacheQueryResponse()
Empty constructor for
Externalizable |
GridCacheQueryResponse(int cacheId,
long reqId,
boolean finished,
boolean fields,
boolean addDepInfo) |
GridCacheQueryResponse(int cacheId,
long reqId,
Throwable err,
boolean addDepInfo) |
Modifier and Type | Method and Description |
---|---|
boolean |
addDeploymentInfo()
Deployment enabled flag indicates whether deployment info has to be added to this message.
|
Collection<Object> |
data() |
void |
data(Collection<?> data) |
short |
directType()
Gets message type.
|
Throwable |
error() |
boolean |
fields() |
byte |
fieldsCount()
Gets fields count.
|
void |
finished(boolean finished) |
void |
finishUnmarshal(GridCacheSharedContext ctx,
ClassLoader ldr)
This method is called after the message is deserialized and is responsible for
unmarshalling state marshalled in
GridCacheMessage.prepareMarshal(GridCacheSharedContext) method. |
boolean |
isFinished() |
List<GridQueryFieldMetadata> |
metadata() |
void |
metadata(List<GridQueryFieldMetadata> metadata) |
void |
prepareMarshal(GridCacheSharedContext ctx)
This method is called before the whole message is serialized
and is responsible for pre-marshalling state.
|
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
long |
requestId() |
String |
toString() |
protected <T> List<T> |
unmarshalCollection0(Collection<byte[]> byteCol,
GridCacheSharedContext ctx,
ClassLoader ldr) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
cacheGroupMessage, cacheId, cacheId, handlerId
appendFlag, classError, deployInfo, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, topologyVersion, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
deployInfo, prepare
public GridCacheQueryResponse()
Externalizable
public GridCacheQueryResponse(int cacheId, long reqId, boolean finished, boolean fields, boolean addDepInfo)
cacheId
- Cache ID.reqId
- Request id.finished
- Last response or not.fields
- Fields query or not.addDepInfo
- Deployment info flag.public GridCacheQueryResponse(int cacheId, long reqId, Throwable err, boolean addDepInfo)
cacheId
- Cache ID.reqId
- Request id.err
- Error.addDepInfo
- Deployment info flag.public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
prepareMarshal
in class GridCacheMessage
ctx
- IgniteCheckedException
- If failed.public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
GridCacheMessage.prepareMarshal(GridCacheSharedContext)
method.finishUnmarshal
in class GridCacheMessage
ctx
- Context.ldr
- Class loader.IgniteCheckedException
- If failed.@Nullable protected <T> List<T> unmarshalCollection0(@Nullable Collection<byte[]> byteCol, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
byteCol
- Collection to unmarshal.ctx
- Context.ldr
- Loader.IgniteCheckedException
- If failed.public boolean addDeploymentInfo()
addDeploymentInfo
in class GridCacheMessage
true
or if deployment info must be added to the the message, false
otherwise.public List<GridQueryFieldMetadata> metadata()
public void metadata(@Nullable List<GridQueryFieldMetadata> metadata)
metadata
- Metadata.public Collection<Object> data()
public void data(Collection<?> data)
data
- Query data.public boolean isFinished()
public void finished(boolean finished)
finished
- If this is last response for this request or not.public long requestId()
public Throwable error()
error
in class GridCacheMessage
public boolean fields()
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
writeTo
in interface Message
writeTo
in class GridCacheIdMessage
buf
- Byte buffer.writer
- Writer.public boolean readFrom(ByteBuffer buf, MessageReader reader)
readFrom
in interface Message
readFrom
in class GridCacheIdMessage
buf
- Byte buffer.reader
- Reader.public short directType()
directType
in interface Message
public byte fieldsCount()
fieldsCount
in interface Message
fieldsCount
in class GridCacheIdMessage
public String toString()
toString
in class GridCacheIdMessage
Follow @ApacheIgnite
Ignite Fabric : ver. 2.3.0 Release Date : October 28 2017