All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.client.hotrod.Search Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.client.hotrod;

import org.infinispan.client.hotrod.event.impl.ContinuousQueryImpl;
import org.infinispan.client.hotrod.impl.InternalRemoteCache;
import org.infinispan.client.hotrod.impl.query.RemoteQueryFactory;
import org.infinispan.query.api.continuous.ContinuousQuery;
import org.infinispan.query.dsl.QueryFactory;

/**
 * @author [email protected]
 * @since 6.0
 */
public final class Search {

   private Search() {
   }

   public static QueryFactory getQueryFactory(RemoteCache cache) {
      if (cache == null) {
         throw new IllegalArgumentException("cache parameter cannot be null");
      }

      return new RemoteQueryFactory((InternalRemoteCache) cache);
   }

   /**
    *
    * @return the continuous query service for the provided cache
    * @deprecated use {@link RemoteCache#continuousQuery()} instead.
    */
   @Deprecated
   public static  ContinuousQuery getContinuousQuery(RemoteCache cache) {
      return new ContinuousQueryImpl<>(cache);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy