org.infinispan.client.hotrod.multimap.RemoteMultimapCacheManager Maven / Gradle / Ivy
package org.infinispan.client.hotrod.multimap;
import java.util.Collection;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.impl.multimap.RemoteMultimapCacheImpl;
/**
* @author Katia Aresti, [email protected]
* @since 9.2
*/
public class RemoteMultimapCacheManager implements MultimapCacheManager {
private final RemoteCacheManager remoteCacheManager;
public RemoteMultimapCacheManager(RemoteCacheManager remoteCacheManager) {
this.remoteCacheManager = remoteCacheManager;
}
@Override
public RemoteMultimapCache get(String cacheName, boolean supportsDuplicates) {
RemoteCache> cache = remoteCacheManager.getCache(cacheName);
RemoteMultimapCacheImpl multimapCache = new RemoteMultimapCacheImpl<>(remoteCacheManager, cache, supportsDuplicates);
multimapCache.init();
return multimapCache;
}
}