public interface Matcher
org.infinispan.query.dsl
). The matching
filters are notified via a callback supplied when registering the filter. The filter will have to specify the fully
qualified type name of the matching entity type because simple names cannot be easily resolved as it would happen
in the case of an EntityManager
which has knowledge of all types in advance and is able to
translate simple names to fully qualified names unambiguously.
Full-text predicates are not supported at the moment.
This is a low-level interface which should not be directly used by Infinispan users.
Modifier and Type | Method and Description |
---|---|
ObjectFilter |
getObjectFilter(FilterSubscription filterSubscription)
Obtains an ObjectFilter instance that is capable of testing a single filter condition.
|
ObjectFilter |
getObjectFilter(Query query) |
ObjectFilter |
getObjectFilter(String queryString) |
ObjectFilter |
getObjectFilter(String queryString,
List<FieldAccumulator> acc) |
void |
match(Object userContext,
Object eventType,
Object instance)
Test the given instance against all the subscribed filters and notify all callbacks registered for instances of
the same instance type.
|
void |
matchDelta(Object userContext,
Object eventType,
Object instanceOld,
Object instanceNew,
Object joinEvent,
Object updateEvent,
Object leaveEvent)
Test two instances (which are actually before/after snapshots of the same instance) against all the subscribed
filters and notify all callbacks registered for instances of the same instance type.
|
FilterSubscription |
registerFilter(Query query,
FilterCallback callback,
boolean isDeltaFilter,
Object... eventType) |
FilterSubscription |
registerFilter(Query query,
FilterCallback callback,
Object... eventType) |
FilterSubscription |
registerFilter(String queryString,
FilterCallback callback,
boolean isDeltaFilter,
Object... eventType) |
FilterSubscription |
registerFilter(String queryString,
FilterCallback callback,
Object... eventType) |
FilterSubscription |
registerFilter(String queryString,
Map<String,Object> namedParameters,
FilterCallback callback,
boolean isDeltaFilter,
Object... eventType) |
FilterSubscription |
registerFilter(String queryString,
Map<String,Object> namedParameters,
FilterCallback callback,
Object... eventType) |
void |
unregisterFilter(FilterSubscription filterSubscription) |
FilterSubscription registerFilter(Query query, FilterCallback callback, Object... eventType)
FilterSubscription registerFilter(String queryString, Map<String,Object> namedParameters, FilterCallback callback, Object... eventType)
FilterSubscription registerFilter(String queryString, FilterCallback callback, Object... eventType)
FilterSubscription registerFilter(Query query, FilterCallback callback, boolean isDeltaFilter, Object... eventType)
FilterSubscription registerFilter(String queryString, Map<String,Object> namedParameters, FilterCallback callback, boolean isDeltaFilter, Object... eventType)
FilterSubscription registerFilter(String queryString, FilterCallback callback, boolean isDeltaFilter, Object... eventType)
void unregisterFilter(FilterSubscription filterSubscription)
void match(Object userContext, Object eventType, Object instance)
isDelta
parameter of the callback will be false
.userContext
- an optional user provided object to be passed to matching subscribers along with the matching
instance; can be null
eventType
- on optional event type discriminator that is matched against the event type specified when the
filter was registered; can be null
instance
- the object to test against the registered filters; never null
void matchDelta(Object userContext, Object eventType, Object instanceOld, Object instanceNew, Object joinEvent, Object updateEvent, Object leaveEvent)
isDelta
parameter
of the callback will be true
.userContext
- an optional user provided object to be passed to matching subscribers along with the matching
instance; can be null
eventType
- on optional event type discriminator that is matched against the event type specified when the
filter was registered; can be null
instanceOld
- the 'before' object to test against the registered filters; never null
instanceNew
- the 'after' object to test against the registered filters; never null
joinEvent
- the event to generate if the instance joins the matching setupdateEvent
- the event to generate if a matching instance is updated and continues to the matchleaveEvent
- the event to generate if the instance leaves the matching setObjectFilter getObjectFilter(FilterSubscription filterSubscription)
filterSubscription
- a filter subscription previously registered with this Matcher; the newly created
ObjectFilter will be based on the same filter conditionObjectFilter getObjectFilter(Query query)
ObjectFilter getObjectFilter(String queryString)
ObjectFilter getObjectFilter(String queryString, List<FieldAccumulator> acc)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.