Skip to content

Commit

Permalink
check for segmentation being disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wburns committed Jan 23, 2020
1 parent 23a6d22 commit 5e76619
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.infinispan.context.impl.FlagBitSets;
import org.infinispan.context.impl.ImmutableContext;
import org.infinispan.distribution.ch.KeyPartitioner;
import org.infinispan.distribution.ch.impl.SingleSegmentKeyPartitioner;
import org.infinispan.encoding.DataConversion;
import org.infinispan.eviction.ActivationManager;
import org.infinispan.eviction.PassivationManager;
Expand Down Expand Up @@ -281,7 +282,12 @@ public void wireRealCache() {
protected void internalWire(T cache) {
componentRegistry = cache.componentRegistry;
expirationManager = cache.expirationManager;
keyPartitioner = cache.keyPartitioner;
if (componentRegistry.getGlobalComponentRegistry().getGlobalConfiguration().features().isAvailable(
DataContainerFactory.SEGMENTATION_FEATURE)) {
keyPartitioner = cache.keyPartitioner;
} else {
keyPartitioner = SingleSegmentKeyPartitioner.getInstance();
}
wireRealCache();
}

Expand Down

0 comments on commit 5e76619

Please sign in to comment.