Source:
private ClusterCacheStatus initCacheStatusIfAbsent(String cacheName, CacheMode cacheMode) { return cacheStatusMap.computeIfAbsent(cacheName, (name) -> { LostDataCheck lostDataCheck; if (cacheMode.isScattered()) { lostDataCheck = (stableCH, newMembers) -> { Set<Address> lostMembers = new HashSet<>(stableCH.getMembers()); lostMembers.removeAll(newMembers); log.debugf("Stable CH members: %s, actual members: %s, lost members: %s", stableCH.getMembers(), newMembers, lostMembers); return lostMembers.size() > 1; }; } else { lostDataCheck = (stableCH, newMembers) -> { for (int i = 0; i < stableCH.getNumSegments(); i++) { if (!InfinispanCollections.containsAny(newMembers, stableCH.locateOwnersForSegment(i))) return true; } return false; }; } AvailabilityStrategy availabilityStrategy; Configuration config = cacheManager.getCacheConfiguration(cacheName); PartitionHandling partitionHandling = config != null ? config.clustering().partitionHandling().whenSplit() : null; boolean resolveConflictsOnMerge = resolveConflictsOnMerge(config, cacheMode); if (partitionHandling != null && partitionHandling != PartitionHandling.ALLOW_READ_WRITES) { availabilityStrategy = new PreferConsistencyStrategy(eventLogManager, persistentUUIDManager, lostDataCheck); } else { availabilityStrategy = new PreferAvailabilityStrategy(eventLogManager, persistentUUIDManager, lostDataCheck); } Optional<GlobalStateManager> globalStateManager = cacheManager.getGlobalComponentRegistry().getOptionalComponent(GlobalStateManager.class); Optional<ScopedPersistentState> persistedState = globalStateManager.flatMap(gsm -> gsm.readScopedState(cacheName)); return new ClusterCacheStatus(cacheManager, cacheName, availabilityStrategy, RebalanceType.from(cacheMode), this, transport, persistedState, persistentUUIDManager, resolveConflictsOnMerge); }); }

Target:
private ClusterCacheStatus initCacheStatusIfAbsent(String cacheName, CacheMode cacheMode) { return cacheStatusMap.computeIfAbsent(cacheName, (name) -> { LostDataCheck lostDataCheck; if (cacheMode.isScattered()) { lostDataCheck = (stableCH, newMembers) -> { Set<Address> lostMembers = new HashSet<>(stableCH.getMembers()); lostMembers.removeAll(newMembers); log.debugf("Stable CH members: %s, actual members: %s, lost members: %s", stableCH.getMembers(), newMembers, lostMembers); return lostMembers.size() > 1; }; } else { lostDataCheck = (stableCH, newMembers) -> { for (int i = 0; i < stableCH.getNumSegments(); i++) { if (!InfinispanCollections.containsAny(newMembers, stableCH.locateOwnersForSegment(i))) return true; } return false; }; } AvailabilityStrategy availabilityStrategy; Configuration config = cacheManager.getCacheConfiguration(cacheName); PartitionHandling partitionHandling = config != null ? config.clustering().partitionHandling().whenSplit() : null; boolean resolveConflictsOnMerge = resolveConflictsOnMerge(config, cacheMode); if (partitionHandling != null && partitionHandling != PartitionHandling.ALLOW_READ_WRITES) { availabilityStrategy = new PreferConsistencyStrategy(eventLogManager, persistentUUIDManager, lostDataCheck); } else { availabilityStrategy = new PreferAvailabilityStrategy(eventLogManager, persistentUUIDManager, lostDataCheck); } Optional<GlobalStateManager> globalStateManager = gcr.getOptionalComponent(GlobalStateManager.class); Optional<ScopedPersistentState> persistedState = globalStateManager.flatMap(gsm -> gsm.readScopedState(cacheName)); return new ClusterCacheStatus(cacheManager, cacheName, availabilityStrategy, RebalanceType.from(cacheMode), this, transport, persistedState, persistentUUIDManager, resolveConflictsOnMerge); }); }