org.infinispan.query.api.continuous.ContinuousQuery Maven / Gradle / Ivy
Show all versions of infinispan-embedded-query
package org.infinispan.query.api.continuous;
import java.util.List;
import java.util.Map;
import org.infinispan.query.dsl.Query;
/**
* A container of continuous query listeners for a cache.
*
* Implementations are not expected to be threadsafe.
*
* @author [email protected]
* @since 8.2
*/
public interface ContinuousQuery {
/**
* Add a listener for a continuous query.
*
* @param queryString the query
* @param listener the listener
*/
void addContinuousQueryListener(String queryString, ContinuousQueryListener listener);
/**
* Add a listener for a continuous query.
*
* @param queryString the query
* @param namedParameters the query parameters
* @param listener the listener
*/
void addContinuousQueryListener(String queryString, Map namedParameters, ContinuousQueryListener listener);
/**
* Add a listener for a continuous query.
*
* @param query the query object
* @param listener the listener
*/
void addContinuousQueryListener(Query query, ContinuousQueryListener listener);
/**
* Remove a continuous query listener.
*
* @param listener the listener to remove
*/
void removeContinuousQueryListener(ContinuousQueryListener listener);
/**
* Get the list of currently registered listeners.
*/
List> getListeners();
/**
* Unregisters all listeners.
*/
void removeAllListeners();
}