public final class ContinuousQueryImpl<K,V> extends Object implements ContinuousQuery<K,V>
This class is not threadsafe.
Constructor and Description |
---|
ContinuousQueryImpl(RemoteCache<K,V> cache) |
Modifier and Type | Method and Description |
---|---|
<C> void |
addContinuousQueryListener(Query query,
ContinuousQueryListener<K,C> listener)
Registers a continuous query listener that uses a query DSL based filter.
|
<C> void |
addContinuousQueryListener(String queryString,
ContinuousQueryListener<K,C> listener)
Add a listener for a continuous query.
|
<C> void |
addContinuousQueryListener(String queryString,
Map<String,Object> namedParameters,
ContinuousQueryListener<K,C> listener)
Add a listener for a continuous query.
|
List<ContinuousQueryListener<K,?>> |
getListeners()
Get the list of currently registered listeners.
|
void |
removeAllListeners()
Unregisters all listeners.
|
void |
removeContinuousQueryListener(ContinuousQueryListener<K,?> listener)
Remove a continuous query listener.
|
public ContinuousQueryImpl(RemoteCache<K,V> cache)
public <C> void addContinuousQueryListener(String queryString, ContinuousQueryListener<K,C> listener)
ContinuousQuery
addContinuousQueryListener
in interface ContinuousQuery<K,V>
queryString
- the querylistener
- the listenerpublic <C> void addContinuousQueryListener(String queryString, Map<String,Object> namedParameters, ContinuousQueryListener<K,C> listener)
ContinuousQuery
addContinuousQueryListener
in interface ContinuousQuery<K,V>
queryString
- the querynamedParameters
- the query parameterslistener
- the listenerpublic <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K,C> listener)
addContinuousQueryListener
in interface ContinuousQuery<K,V>
listener
- the continuous query listener instancequery
- the query to be used for determining the matching setpublic void removeContinuousQueryListener(ContinuousQueryListener<K,?> listener)
ContinuousQuery
removeContinuousQueryListener
in interface ContinuousQuery<K,V>
listener
- the listener to removepublic List<ContinuousQueryListener<K,?>> getListeners()
ContinuousQuery
getListeners
in interface ContinuousQuery<K,V>
public void removeAllListeners()
ContinuousQuery
removeAllListeners
in interface ContinuousQuery<K,V>
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.