org.infinispan.hotrod.HotRodSyncCaches Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-hotrod-jakarta Show documentation
Show all versions of infinispan-hotrod-jakarta Show documentation
Infinispan Hot Rod Client Jakarta EE
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;
}
}