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

org.infinispan.client.hotrod.near.DefaultNearCacheFactory Maven / Gradle / Ivy

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

import java.util.function.BiConsumer;

import org.infinispan.client.hotrod.MetadataValue;
import org.infinispan.client.hotrod.configuration.NearCacheConfiguration;

/**
 * @since 14.0
 **/
public class DefaultNearCacheFactory implements NearCacheFactory {
   public static final DefaultNearCacheFactory INSTANCE = new DefaultNearCacheFactory();

   @Override
   public  NearCache createNearCache(NearCacheConfiguration config, BiConsumer> removedConsumer) {
      return config.maxEntries() > 0
            ? BoundedConcurrentMapNearCache.create(config, removedConsumer)
            : ConcurrentMapNearCache.create();
   }

   @Override
   public String toString() {
      return "DefaultNearCacheFactory{}";
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy