Skip to content

Commit

Permalink
make sure to use the appropriate key partitioner for real!
Browse files Browse the repository at this point in the history
  • Loading branch information
wburns committed Jan 31, 2020
1 parent f2e7f54 commit a44ae6e
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ public AbstractGetAdvancedCache(AdvancedCache<K, V> cache, AdvancedCacheWrapper<
public void wireRealCache() {
// Wire the cache to ensure all components are ready
componentRegistry.wireDependencies(cache);

keyPartitioner = componentRegistry.getGlobalComponentRegistry().getGlobalConfiguration().features().isAvailable(
DataContainerFactory.SEGMENTATION_FEATURE) ? keyPartitioner : SingleSegmentKeyPartitioner.getInstance();
}

/**
Expand All @@ -279,12 +282,7 @@ public void wireRealCache() {
protected void internalWire(T cache) {
componentRegistry = cache.componentRegistry;
expirationManager = cache.expirationManager;
if (componentRegistry.getGlobalComponentRegistry().getGlobalConfiguration().features().isAvailable(
DataContainerFactory.SEGMENTATION_FEATURE)) {
keyPartitioner = cache.keyPartitioner;
} else {
keyPartitioner = SingleSegmentKeyPartitioner.getInstance();
}
keyPartitioner = cache.keyPartitioner;
wireRealCache();
}

Expand Down

0 comments on commit a44ae6e

Please sign in to comment.