Source:
private <K, V> ClusteredStore<K, V> createStoreInternal(Configuration<K, V> storeConfig, Object[] serviceConfigs) { DefaultCacheLoaderWriterConfiguration loaderWriterConfiguration = findSingletonAmongst(DefaultCacheLoaderWriterConfiguration.class, serviceConfigs); if (loaderWriterConfiguration != null) { throw new IllegalStateException("CacheLoaderWriter is not supported with cluster tiers"); } CacheEventListenerConfiguration eventListenerConfiguration = findSingletonAmongst(CacheEventListenerConfiguration.class, serviceConfigs); if (eventListenerConfiguration != null) { throw new IllegalStateException("CacheEventListener is not supported with cluster tiers"); } if (clusteringService == null) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore called without ClusteringServiceConfiguration"); } final HashSet<ResourceType<?>> clusteredResourceTypes = new HashSet<ResourceType<?>>(storeConfig.getResourcePools().getResourceTypeSet()); clusteredResourceTypes.retainAll(CLUSTER_RESOURCES); if (clusteredResourceTypes.isEmpty()) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore called without ClusteredResourcePools"); } if (clusteredResourceTypes.size() != 1) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore can not create cluster tier with multiple clustered resources"); } ClusteredStoreConfiguration clusteredStoreConfiguration = findSingletonAmongst(ClusteredStoreConfiguration.class, serviceConfigs); if (clusteredStoreConfiguration == null) { clusteredStoreConfiguration = new ClusteredStoreConfiguration(); } ClusteredCacheIdentifier cacheId = findSingletonAmongst(ClusteredCacheIdentifier.class, serviceConfigs); TimeSource timeSource = serviceProvider.getService(TimeSourceService.class).getTimeSource(); OperationsCodec<K, V> codec = new OperationsCodec<K, V>(storeConfig.getKeySerializer(), storeConfig.getValueSerializer()); ChainResolver<K, V> resolver = new ChainResolver<K, V>(codec, storeConfig.getExpiry()); ClusteredStore<K, V> store = new ClusteredStore<K, V>(codec, resolver, timeSource); createdStores.put(store, new StoreConfig(cacheId, storeConfig, clusteredStoreConfiguration.getConsistency())); return store; }

Target:
private <K, V> ClusteredStore<K, V> createStoreInternal(Configuration<K, V> storeConfig, Object[] serviceConfigs) { DefaultCacheLoaderWriterConfiguration loaderWriterConfiguration = findSingletonAmongst(DefaultCacheLoaderWriterConfiguration.class, serviceConfigs); if (loaderWriterConfiguration != null) { throw new IllegalStateException("CacheLoaderWriter is not supported with clustered tiers"); } CacheEventListenerConfiguration eventListenerConfiguration = findSingletonAmongst(CacheEventListenerConfiguration.class, serviceConfigs); if (eventListenerConfiguration != null) { throw new IllegalStateException("CacheEventListener is not supported with clustered tiers"); } if (clusteringService == null) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore called without ClusteringServiceConfiguration"); } final HashSet<ResourceType<?>> clusteredResourceTypes = new HashSet<ResourceType<?>>(storeConfig.getResourcePools().getResourceTypeSet()); clusteredResourceTypes.retainAll(CLUSTER_RESOURCES); if (clusteredResourceTypes.isEmpty()) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore called without ClusteredResourcePools"); } if (clusteredResourceTypes.size() != 1) { throw new IllegalStateException(Provider.class.getCanonicalName() + ".createStore can not create clustered tier with multiple clustered resources"); } ClusteredStoreConfiguration clusteredStoreConfiguration = findSingletonAmongst(ClusteredStoreConfiguration.class, serviceConfigs); if (clusteredStoreConfiguration == null) { clusteredStoreConfiguration = new ClusteredStoreConfiguration(); } ClusteredCacheIdentifier cacheId = findSingletonAmongst(ClusteredCacheIdentifier.class, serviceConfigs); TimeSource timeSource = serviceProvider.getService(TimeSourceService.class).getTimeSource(); OperationsCodec<K, V> codec = new OperationsCodec<K, V>(storeConfig.getKeySerializer(), storeConfig.getValueSerializer()); ChainResolver<K, V> resolver = new ChainResolver<K, V>(codec, storeConfig.getExpiry()); ClusteredStore<K, V> store = new ClusteredStore<K, V>(codec, resolver, timeSource); createdStores.put(store, new StoreConfig(cacheId, storeConfig, clusteredStoreConfiguration.getConsistency())); return store; }