Class ContinuousQueryImpl<K,V>
java.lang.Object
org.infinispan.client.hotrod.event.impl.ContinuousQueryImpl<K,V>
- All Implemented Interfaces:
ContinuousQuery<K,
V>
A container of continuous query listeners for a remote cache.
This class is not threadsafe.
- Since:
- 8.2
- Author:
- anistor@redhat.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<C> void
addContinuousQueryListener
(String queryString, Map<String, Object> namedParameters, ContinuousQueryListener<K, C> listener) Add a listener for a continuous query.<C> void
addContinuousQueryListener
(String queryString, ContinuousQueryListener<K, C> listener) Add a listener for a continuous query.<C> void
addContinuousQueryListener
(Query<?> query, ContinuousQueryListener<K, C> listener) Registers a continuous query listener that uses a query DSL based filter.Get the list of currently registered listeners.void
Unregisters all listeners.void
removeContinuousQueryListener
(ContinuousQueryListener<K, ?> listener) Remove a continuous query listener.
-
Constructor Details
-
ContinuousQueryImpl
-
-
Method Details
-
addContinuousQueryListener
public <C> void addContinuousQueryListener(String queryString, ContinuousQueryListener<K, C> listener) Description copied from interface:ContinuousQuery
Add a listener for a continuous query.- Specified by:
addContinuousQueryListener
in interfaceContinuousQuery<K,
V> - Parameters:
queryString
- the querylistener
- the listener
-
addContinuousQueryListener
public <C> void addContinuousQueryListener(String queryString, Map<String, Object> namedParameters, ContinuousQueryListener<K, C> listener) Description copied from interface:ContinuousQuery
Add a listener for a continuous query.- Specified by:
addContinuousQueryListener
in interfaceContinuousQuery<K,
V> - Parameters:
queryString
- the querynamedParameters
- the query parameterslistener
- the listener
-
addContinuousQueryListener
Registers a continuous query listener that uses a query DSL based filter. The listener will receive notifications when a cache entry joins or leaves the matching set defined by the query.- Specified by:
addContinuousQueryListener
in interfaceContinuousQuery<K,
V> - Parameters:
listener
- the continuous query listener instancequery
- the query to be used for determining the matching set
-
removeContinuousQueryListener
Description copied from interface:ContinuousQuery
Remove a continuous query listener.- Specified by:
removeContinuousQueryListener
in interfaceContinuousQuery<K,
V> - Parameters:
listener
- the listener to remove
-
getListeners
Description copied from interface:ContinuousQuery
Get the list of currently registered listeners.- Specified by:
getListeners
in interfaceContinuousQuery<K,
V>
-
removeAllListeners
public void removeAllListeners()Description copied from interface:ContinuousQuery
Unregisters all listeners.- Specified by:
removeAllListeners
in interfaceContinuousQuery<K,
V>
-