Class GridCacheQueryRequest
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,Message
public class GridCacheQueryRequest extends GridCacheIdMessage implements GridCacheDeployable
Query request.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheId
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridCacheQueryRequest()Required byExternalizable
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddDeploymentInfo()Deployment enabled flag indicates whether deployment info has to be added to this message.booleanallPages()Object[]arguments()StringcacheName()booleancancel()static GridCacheQueryRequestcancelRequest(GridCacheContext<?,?> cctx, long reqId, boolean fieldsQry)Send cancel query request, so no new pages will be sent.StringclassName()Stringclause()shortdirectType()Gets message type.booleanfields()bytefieldsCount()Gets fields count.voidfinishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)This method is called after the message is deserialized and is responsible for unmarshalling state marshalled inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.longid()IndexQueryDescidxQryDesc()booleanincludeBackups()booleanincludeMetaData()BooleanisDataPageScanEnabled()booleankeepBinary()IgniteBiPredicate<Object,Object>keyValueFilter()intlimit()static GridCacheQueryRequestpageRequest(GridCacheContext<?,?> cctx, long reqId, CacheQuery<?> qry, boolean fields)Send request for fetching query result pages to specified nodes.intpageSize()intpartition()voidprepareMarshal(GridCacheSharedContext ctx)This method is called before the whole message is serialized and is responsible for pre-marshalling state.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.IgniteReducer<Object,Object>reducer()Collection<KeyCacheObject>skipKeys()static GridCacheQueryRequeststartQueryRequest(GridCacheContext<?,?> cctx, long reqId, GridCacheDistributedQueryFuture<?,?,?> fut)Send initial query request to specified nodes.inttaskHash()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()IgniteClosure<?,?>transformer()GridCacheQueryTypetype()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheGroupMessage, cacheId, cacheId, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable
deployInfo, prepare
-
-
-
-
Constructor Detail
-
GridCacheQueryRequest
public GridCacheQueryRequest()
Required byExternalizable
-
-
Method Detail
-
startQueryRequest
public static GridCacheQueryRequest startQueryRequest(GridCacheContext<?,?> cctx, long reqId, GridCacheDistributedQueryFuture<?,?,?> fut)
Send initial query request to specified nodes.- Parameters:
reqId- Request (cache query) ID.fut- Cache query future, contains query info.
-
pageRequest
public static GridCacheQueryRequest pageRequest(GridCacheContext<?,?> cctx, long reqId, CacheQuery<?> qry, boolean fields)
Send request for fetching query result pages to specified nodes.- Parameters:
reqId- Request (cache query) ID.
-
cancelRequest
public static GridCacheQueryRequest cancelRequest(GridCacheContext<?,?> cctx, long reqId, boolean fieldsQry)
Send cancel query request, so no new pages will be sent.- Parameters:
reqId- Query request ID.fieldsQry- Whether query is a fields query.
-
topologyVersion
public AffinityTopologyVersion topologyVersion()
Gets topology version or -1 in case of topology version is not required for this message.- Overrides:
topologyVersionin classGridCacheMessage- Returns:
- Topology version.
-
prepareMarshal
public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
This method is called before the whole message is serialized and is responsible for pre-marshalling state.- Overrides:
prepareMarshalin classGridCacheMessage- Parameters:
ctx- Cache context.- Throws:
IgniteCheckedException- If failed.
-
finishUnmarshal
public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
This method is called after the message is deserialized and is responsible for unmarshalling state marshalled inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.- Overrides:
finishUnmarshalin classGridCacheMessage- Parameters:
ctx- Context.ldr- Class loader.- Throws:
IgniteCheckedException- If failed.
-
addDeploymentInfo
public boolean addDeploymentInfo()
Deployment enabled flag indicates whether deployment info has to be added to this message.- Specified by:
addDeploymentInfoin classGridCacheMessage- Returns:
trueor if deployment info must be added to the the message,falseotherwise.
-
id
public long id()
- Returns:
- Request id.
-
cacheName
public String cacheName()
- Returns:
- Cache name.
-
type
public GridCacheQueryType type()
- Returns:
- Query type.
-
fields
public boolean fields()
- Returns:
trueif query returns fields.
-
limit
public int limit()
- Returns:
- Query limit.
-
clause
public String clause()
- Returns:
- Query clause.
-
idxQryDesc
public IndexQueryDesc idxQryDesc()
- Returns:
- Index query description.
-
className
public String className()
- Returns:
- Class name.
-
includeBackups
public boolean includeBackups()
- Returns:
- Flag indicating whether to include backups.
-
cancel
public boolean cancel()
- Returns:
- Flag indicating that this is cancel request.
-
keyValueFilter
public IgniteBiPredicate<Object,Object> keyValueFilter()
- Returns:
- Key-value filter.
-
reducer
public IgniteReducer<Object,Object> reducer()
- Returns:
- Reducer.
-
transformer
public IgniteClosure<?,?> transformer()
- Returns:
- Transformer.
-
pageSize
public int pageSize()
- Returns:
- Page size.
-
arguments
public Object[] arguments()
- Returns:
- Arguments.
-
includeMetaData
public boolean includeMetaData()
- Returns:
- Include meta data or not.
-
allPages
public boolean allPages()
- Returns:
- Whether to load all pages.
-
keepBinary
public boolean keepBinary()
- Returns:
- Whether to keep binary.
-
taskHash
public int taskHash()
- Returns:
- Task hash.
-
isDataPageScanEnabled
public Boolean isDataPageScanEnabled()
- Returns:
- Flag to enable data page scan.
-
skipKeys
public Collection<KeyCacheObject> skipKeys()
- Returns:
- Set of keys that must be skiped during iteration.
-
partition
public int partition()
- Overrides:
partitionin classGridCacheMessage- Returns:
- partition.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridCacheIdMessage- Parameters:
buf- Byte buffer.writer- Writer.- Returns:
- Whether message was fully written.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.- Specified by:
readFromin interfaceMessage- Overrides:
readFromin classGridCacheIdMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheIdMessage- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridCacheIdMessage
-
-