コード例 #1
0
 @Override
 public boolean isStoreByValue() {
   CopierConfiguration copierConfig =
       findSingletonAmongst(
           CopierConfiguration.class, cacheConfiguration.getServiceConfigurations());
   return copierConfig != null;
 }
コード例 #2
0
 private static <K, V> boolean isStoreByValue(
     Configuration<K, V> config, CacheConfiguration<K, V> ehcacheConfig) {
   if (ehcacheConfig != null) {
     Collection<ServiceConfiguration<?>> serviceConfigurations =
         ehcacheConfig.getServiceConfigurations();
     for (ServiceConfiguration<?> serviceConfiguration : serviceConfigurations) {
       if (serviceConfiguration instanceof DefaultCopierConfiguration) {
         DefaultCopierConfiguration copierConfig =
             (DefaultCopierConfiguration) serviceConfiguration;
         if (copierConfig.getType().equals(DefaultCopierConfiguration.Type.VALUE)) {
           if (copierConfig.getClazz().isAssignableFrom(IdentityCopier.class)) {
             return false;
           } else {
             return true;
           }
         }
       }
     }
   }
   return config.isStoreByValue();
 }
コード例 #3
0
 @Override
 public Class<V> getValueType() {
   return cacheConfiguration.getValueType();
 }
コード例 #4
0
 @Override
 public Class<K> getKeyType() {
   return cacheConfiguration.getKeyType();
 }