Package org.infinispan.objectfilter.impl
Class RowMatcher
- java.lang.Object
-
- org.infinispan.objectfilter.impl.BaseMatcher<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
-
- org.infinispan.objectfilter.impl.RowMatcher
-
- All Implemented Interfaces:
Matcher
public final class RowMatcher extends BaseMatcher<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
A matcher for projection rows. This matcher is not stateless so it cannot be reused.- Since:
- 8.0
- Author:
- anistor@redhat.com
-
-
Field Summary
-
Fields inherited from class org.infinispan.objectfilter.impl.BaseMatcher
propertyHelper
-
-
Constructor Summary
Constructors Constructor Description RowMatcher(org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata[] columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MetadataAdapter<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
createMetadataAdapter(org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata rowMetadata)
protected org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext
startMultiTypeContext(boolean isDeltaFilter, Object userContext, Object eventType, Object instance)
Creates a newMatcherEvalContext
capable of dealing with multiple filters.protected org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext
startSingleTypeContext(Object userContext, Object eventType, Object instance, MetadataAdapter<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer> metadataAdapter)
Creates a newMatcherEvalContext
capable of dealing with a single filter for a single type.-
Methods inherited from class org.infinispan.objectfilter.impl.BaseMatcher
convert, getFilterRegistryForType, getObjectFilter, getObjectFilter, getObjectFilter, getObjectFilter, getPropertyHelper, match, matchDelta, registerFilter, registerFilter, registerFilter, registerFilter, registerFilter, registerFilter, unregisterFilter
-
-
-
-
Method Detail
-
startMultiTypeContext
protected org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext startMultiTypeContext(boolean isDeltaFilter, Object userContext, Object eventType, Object instance)
Description copied from class:BaseMatcher
Creates a newMatcherEvalContext
capable of dealing with multiple filters. The context is created only if the given instance is recognized to be of a type that has some filters registered. If there are no filters,null
is returned to signal this condition and make the evaluation faster. This method must be called while holding the internal write lock.- Specified by:
startMultiTypeContext
in classBaseMatcher<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
- Parameters:
isDeltaFilter
- indicates if this is a delta match of notuserContext
- an opaque value, possibly null, the is received from the caller and is to be handed to theFilterCallback
in case a match is detectedeventType
- on optional event type discriminatorinstance
- the instance to filter; nevernull
- Returns:
- the MatcherEvalContext or
null
if no filter was registered for the instance
-
startSingleTypeContext
protected org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext startSingleTypeContext(Object userContext, Object eventType, Object instance, MetadataAdapter<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer> metadataAdapter)
Description copied from class:BaseMatcher
Creates a newMatcherEvalContext
capable of dealing with a single filter for a single type. The context is created only if the given instance is recognized to be of a type that has some filters registered. If there are no filters,null
is returned to signal this condition and make the evaluation faster. This method must be called while holding the internal write lock.- Specified by:
startSingleTypeContext
in classBaseMatcher<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
- Parameters:
userContext
- an opaque value, possibly null, the is received from the caller and is to be handed to theFilterCallback
in case a match is detectedinstance
- the instance to filter; nevernull
metadataAdapter
- the metadata adapter of expected instance type- Returns:
- the MatcherEvalContext or
null
if no filter was registered for the instance
-
createMetadataAdapter
protected MetadataAdapter<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer> createMetadataAdapter(org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata rowMetadata)
- Specified by:
createMetadataAdapter
in classBaseMatcher<org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.RowMetadata,org.infinispan.objectfilter.impl.syntax.parser.RowPropertyHelper.ColumnMetadata,Integer>
-
-