public class QueryTemplatePacket extends ExternalTemplatePacket
Modifier and Type | Field and Description |
---|---|
protected AggregationSet |
_aggregationSet |
protected boolean |
_allIndexValuesQuery |
static IQueryIndexScanner |
_dummyNullIndexScanner |
protected boolean |
_preparedForSpace |
_extendedMatchCodes, _rangeValues, _rangeValuesInclusion
_implClassName
_returnOnlyUIDs, _typeName
_entryType, _entryTypeCode, _typeDesc, _typeDescChecksum
Constructor and Description |
---|
QueryTemplatePacket() |
QueryTemplatePacket(QueryTableData table,
QueryResultTypeInternal queryResultType) |
QueryTemplatePacket(QueryTableData table,
QueryResultTypeInternal queryResultType,
IContainsItemsCustomQuery containsItemsQuery) |
QueryTemplatePacket(QueryTableData table,
QueryResultTypeInternal queryResultType,
String fieldName,
Range range) |
QueryTemplatePacket(QueryTemplatePacket template) |
Modifier and Type | Method and Description |
---|---|
QueryTemplatePacket |
and(QueryTemplatePacket template)
Merge given templates into one template.
|
QueryTemplatePacket |
and(UnionTemplatePacket template)
Merge given templates into one template.
|
QueryTemplatePacket |
buildAndPacket(QueryTemplatePacket packet) |
QueryTemplatePacket |
buildOrPacket(QueryTemplatePacket packet) |
AggregationSet |
getAggregationSet() |
ExplainPlan |
getExplainPlan() |
Set<String> |
getMultipleUids() |
AbstractProjectionTemplate |
getProjectionTemplate() |
QueryResultTypeInternal |
getQueryResultType() |
HashMap<String,Range> |
getRanges()
Converts the external entry to a map of ranges
|
Object |
getRoutingFieldValue() |
void |
intersectRanges(QueryTemplatePacket template)
Merge given templates into one template.
|
protected void |
intersectUids(QueryTemplatePacket template) |
boolean |
isAllIndexValuesSqlQuery() |
boolean |
isAlwaysEmpty() |
boolean |
isComplex()
Method to indicate whether this query is complex - false only if the template can be
translated to a space query without post processing some space operations don't support
complex queries
|
boolean |
isTransient() |
protected boolean |
matches(IEntryPacket entryPacket) |
boolean |
matches(JoinedEntry joinedEntry) |
void |
prepareForSpace(ITypeDesc typeDesc)
Convert the ranges to a single space template
|
void |
prepareForUnion(ITypeDesc typeDesc)
Temporary method used only for "OR" queries.
|
IQueryResultSet<IEntryPacket> |
read(ISpaceProxy space,
AbstractDMLQuery query,
Transaction txn,
int modifiers,
int maxResults) |
IQueryResultSet<IEntryPacket> |
read(ISpaceProxy space,
Transaction txn,
long timeout,
int modifiers,
boolean ifExists,
int maxResults,
int minEntriesToWaitFor) |
protected void |
readExternal(ObjectInput in,
PlatformLogicalVersion version) |
void |
readFromSwap(ObjectInput in) |
IQueryResultSet<IEntryPacket> |
readMultiple(ISpaceProxy space,
Transaction txn,
int maxResults,
int modifiers) |
void |
setAggregationSet(AggregationSet aggregationSet) |
void |
setAlwaysEmpty(boolean isAlwaysEmpty) |
void |
setEntryType(EntryType objectType) |
void |
setExplainPlan(ExplainPlan explainPlan) |
void |
setExtendedMatchCode(int index,
short eq) |
void |
setMultipleUids(Set<String> multipleUids) |
void |
setProjectionTemplate(AbstractProjectionTemplate projectionTemplate) |
void |
setQueryResultType(QueryResultTypeInternal queryResultType) |
void |
setRangeValue(int index,
Object range) |
void |
setRangeValueInclusion(int index,
boolean include) |
void |
setRouting(Object routing)
Sets the routing value for the template.
|
ArrayList<IEntryPacket> |
take(IJSpace space,
Object routing,
AbstractProjectionTemplate projectionTemplate,
Transaction txn,
long timeout,
int modifiers,
boolean ifExists,
int maxResults,
int minEntriesToWaitFor,
QueryResultTypeInternal resultType) |
QueryTemplatePacket |
union(QueryTemplatePacket packet) |
QueryTemplatePacket |
union(UnionTemplatePacket composite) |
protected void |
writeExternal(ObjectOutput out,
PlatformLogicalVersion version) |
void |
writeToSwap(ObjectOutput out) |
clone, getExtendedMatchCodes, getRangeValues, getRangeValuesInclusion, isIdQuery, isIdsQuery, isTemplateQuery, supportExtendedMatching, validate
getExternalEntryImplClassName, getPacketType, toObject
getCustomQuery, getDynamicProperties, getFieldValue, getFieldValues, getMultipleUIDs, getTTL, getTypeName, getUID, getVersion, hasFixedPropertiesArray, isFifo, isNoWriteLease, isReturnOnlyUids, setCustomQuery, setDynamicProperties, setFieldsValues, setFieldValue, setMultipleUIDs, setReturnOnlyUIDs, setTTL, setUID, setVersion
equals, getCodebase, getEntryType, getID, getOperationID, getPreviousVersion, getPropertyValue, getTypeDescChecksum, getTypeDescriptor, hashCode, hasPreviousVersion, isExternalizableEntryPacket, isSerializeTypeDesc, readExternalImpl, setOperationID, setPreviousVersion, setPropertyValue, setSerializeTypeDesc, setTypeDesc, supportsTypeDescChecksum, toObject, toObject, toObject, toString, toText, validateStorageType, writeExternalImpl
readExternal, writeExternal
finalize, getClass, notify, notifyAll, wait, wait, wait
getTemplateRoutingValue, isBroadcast, isReturnOnlyUids, setDynamicProperties, setReturnOnlyUIDs
allNullFieldValues, getID, getPreviousVersion, getTTL, hasFixedPropertiesArray, hasPreviousVersion, isExternalizableEntryPacket, isHybrid, setCustomQuery, setPreviousVersion, setTTL, setUID
getCodebase, getCustomQuery, getDynamicProperties, getEntryType, getExternalEntryImplClassName, getFieldValue, getFieldValues, getMultipleUIDs, getOperationID, getPacketType, getPropertyValue, getTypeDescChecksum, getTypeDescriptor, getTypeName, getUID, getVersion, isFifo, isNoWriteLease, isSerializeTypeDesc, setFieldsValues, setFieldValue, setMultipleUIDs, setOperationID, setPropertyValue, setSerializeTypeDesc, setTypeDesc, setVersion, supportsTypeDescChecksum, toObject, toObject, toObject, toObject
readExternal, writeExternal
protected boolean _preparedForSpace
protected AggregationSet _aggregationSet
protected boolean _allIndexValuesQuery
public static final IQueryIndexScanner _dummyNullIndexScanner
public QueryTemplatePacket()
public QueryTemplatePacket(QueryTableData table, QueryResultTypeInternal queryResultType)
public QueryTemplatePacket(QueryTableData table, QueryResultTypeInternal queryResultType, String fieldName, Range range)
public QueryTemplatePacket(QueryTableData table, QueryResultTypeInternal queryResultType, IContainsItemsCustomQuery containsItemsQuery)
public QueryTemplatePacket(QueryTemplatePacket template)
public boolean isTransient()
isTransient
in interface ITransportPacket
isTransient
in class EntryPacket
public void prepareForSpace(ITypeDesc typeDesc)
public void prepareForUnion(ITypeDesc typeDesc)
public boolean isAlwaysEmpty()
public void setAlwaysEmpty(boolean isAlwaysEmpty)
public boolean isComplex()
public QueryTemplatePacket buildAndPacket(QueryTemplatePacket packet)
public QueryTemplatePacket and(QueryTemplatePacket template)
public QueryTemplatePacket and(UnionTemplatePacket template)
protected void intersectUids(QueryTemplatePacket template)
public void intersectRanges(QueryTemplatePacket template)
public void setExtendedMatchCode(int index, short eq)
public void setRangeValue(int index, Object range)
public void setRangeValueInclusion(int index, boolean include)
public void setEntryType(EntryType objectType)
public QueryResultTypeInternal getQueryResultType()
getQueryResultType
in interface ITemplatePacket
getQueryResultType
in class ExternalTemplatePacket
public void setQueryResultType(QueryResultTypeInternal queryResultType)
public QueryTemplatePacket buildOrPacket(QueryTemplatePacket packet)
public QueryTemplatePacket union(UnionTemplatePacket composite)
public QueryTemplatePacket union(QueryTemplatePacket packet)
public IQueryResultSet<IEntryPacket> readMultiple(ISpaceProxy space, Transaction txn, int maxResults, int modifiers) throws Exception
Exception
public Object getRoutingFieldValue()
getRoutingFieldValue
in interface ITransportPacket
getRoutingFieldValue
in class ExternalTemplatePacket
public void setRouting(Object routing)
public AbstractProjectionTemplate getProjectionTemplate()
getProjectionTemplate
in interface ITemplatePacket
getProjectionTemplate
in class ExternalTemplatePacket
public void setProjectionTemplate(AbstractProjectionTemplate projectionTemplate)
setProjectionTemplate
in interface ITemplatePacket
setProjectionTemplate
in class ExternalTemplatePacket
public AggregationSet getAggregationSet()
public void setAggregationSet(AggregationSet aggregationSet)
public IQueryResultSet<IEntryPacket> read(ISpaceProxy space, AbstractDMLQuery query, Transaction txn, int modifiers, int maxResults) throws Exception
Exception
public IQueryResultSet<IEntryPacket> read(ISpaceProxy space, Transaction txn, long timeout, int modifiers, boolean ifExists, int maxResults, int minEntriesToWaitFor) throws Exception
Exception
public ArrayList<IEntryPacket> take(IJSpace space, Object routing, AbstractProjectionTemplate projectionTemplate, Transaction txn, long timeout, int modifiers, boolean ifExists, int maxResults, int minEntriesToWaitFor, QueryResultTypeInternal resultType) throws RemoteException, TransactionException, UnusableEntryException, InterruptedException
protected boolean matches(IEntryPacket entryPacket)
public boolean matches(JoinedEntry joinedEntry)
public boolean isAllIndexValuesSqlQuery()
isAllIndexValuesSqlQuery
in interface ITemplatePacket
isAllIndexValuesSqlQuery
in class ExternalTemplatePacket
public void writeToSwap(ObjectOutput out) throws IOException
writeToSwap
in interface ISwapExternalizable
writeToSwap
in class ExternalTemplatePacket
IOException
public void readFromSwap(ObjectInput in) throws IOException, ClassNotFoundException
readFromSwap
in interface ISwapExternalizable
readFromSwap
in class ExternalTemplatePacket
IOException
ClassNotFoundException
protected void writeExternal(ObjectOutput out, PlatformLogicalVersion version) throws IOException
writeExternal
in class ExternalTemplatePacket
IOException
protected void readExternal(ObjectInput in, PlatformLogicalVersion version) throws IOException, ClassNotFoundException
readExternal
in class ExternalTemplatePacket
IOException
ClassNotFoundException
public void setExplainPlan(ExplainPlan explainPlan)
public ExplainPlan getExplainPlan()
Copyright © GigaSpaces.