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

org.infinispan.hotrod.HotRodSyncCaches Maven / Gradle / Ivy

There is a newer version: 14.0.32.Final
Show newest version
package org.infinispan.hotrod;

import static org.infinispan.hotrod.impl.Util.await;

import org.infinispan.api.configuration.CacheConfiguration;
import org.infinispan.api.sync.SyncCaches;
import org.infinispan.hotrod.impl.cache.RemoteCache;

/**
 * @since 14.0
 **/
public class HotRodSyncCaches implements SyncCaches {
   private final HotRod hotrod;

   public HotRodSyncCaches(HotRod hotrod) {
      this.hotrod = hotrod;
   }

   @Override
   public  HotRodSyncCache get(String name) {
      //FIXME
      return await(hotrod.transport.getRemoteCache(name).thenApply(r -> new HotRodSyncCache<>(hotrod, (RemoteCache) r)));
   }

   @Override
   public  HotRodSyncCache create(String name, CacheConfiguration cacheConfiguration) {
      //FIXME
      return await(hotrod.transport.getRemoteCache(name).thenApply(r -> new HotRodSyncCache<>(hotrod, (RemoteCache) r)));
   }

   @Override
   public  HotRodSyncCache create(String name, String template) {
      return await(hotrod.transport.getRemoteCache(name).thenApply(r -> new HotRodSyncCache<>(hotrod, (RemoteCache) r)));
   }

   @Override
   public void remove(String name) {

   }

   @Override
   public Iterable names() {
      return null;
   }

   @Override
   public void createTemplate(String name, CacheConfiguration cacheConfiguration) {

   }

   @Override
   public void removeTemplate(String name) {

   }

   @Override
   public Iterable templateNames() {
      return null;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy