Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.event;
 public class ClientEvents {

The name of the factory used for query DSL based filters and converters. This factory is provided internally by the server.
   public static final String QUERY_DSL_FILTER_FACTORY_NAME = "query-dsl-filter-converter-factory";
      public ClientEvent.Type getType() {
         return ..;
   private ClientEvents() {
      // Static helper class, cannot be constructed
      return ;

Register a client listener that uses a query DSL based filter. The listener is expected to be annotated such that org.infinispan.client.hotrod.annotation.ClientListener.useRawData() = true and org.infinispan.client.hotrod.annotation.ClientListener.filterFactoryName() and org.infinispan.client.hotrod.annotation.ClientListener.converterFactoryName() are equal to QUERY_DSL_FILTER_FACTORY_NAME

remoteCache the remote cache to attach the listener
listener the listener instance
query the query to be used for filtering and conversion (if projections are used)
   public static void addClientQueryListener(RemoteCache<?, ?> remoteCacheObject listenerQuery query) {
      ClientListener l = listener.getClass().getAnnotation(ClientListener.class);
      if (!l.useRawData()) {
         throw new IllegalArgumentException("The client listener must use raw data");
         throw new IllegalArgumentException("The client listener must use the '" +  + "' filter factory");
         throw new IllegalArgumentException("The client listener must use the '" +  + "' converter factory");
      Object[] factoryParams = new Object[]{((BaseQueryquery).getJPAQuery()};
New to GrepCode? Check out our FAQ X