public class DefaultConflictManager<K,V> extends Object implements InternalConflictManager<K,V>
| Constructor and Description |
|---|
DefaultConflictManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelConflictResolution() |
void |
cancelVersionRequests() |
Map<Address,InternalCacheValue<V>> |
getAllVersions(K key)
Get all CacheEntry's that exists for a given key.
|
Stream<Map<Address,CacheEntry<K,V>>> |
getConflicts()
Returns a stream of conflicts detected in the cluster.
|
StateReceiver |
getStateReceiver() |
boolean |
isConflictResolutionInProgress() |
boolean |
isStateTransferInProgress() |
void |
resolveConflicts()
Utilises
ConflictManager.getConflicts() to discover conflicts between Key replicas and utilises the configured
EntryMergePolicy to determine which entry should take precedence. |
CompletionStage<Void> |
resolveConflicts(CacheTopology topology,
Set<Address> preferredNodes) |
void |
resolveConflicts(EntryMergePolicy<K,V> mergePolicy)
Utilises
ConflictManager.getConflicts() to discover conflicts between Key replicas and utilises the provided
EntryMergePolicy to determine which entry should take precedence. |
void |
restartVersionRequests() |
void |
start() |
void |
stop() |
public void start()
public void stop()
public StateReceiver getStateReceiver()
getStateReceiver in interface InternalConflictManager<K,V>public void cancelVersionRequests()
cancelVersionRequests in interface InternalConflictManager<K,V>public void restartVersionRequests()
restartVersionRequests in interface InternalConflictManager<K,V>public Map<Address,InternalCacheValue<V>> getAllVersions(K key)
ConflictManagerDistributionInfo.writeOwners() to request values for a given key.
If a value does not exist for a key at one of the addresses, then a null valued is mapped to said address.getAllVersions in interface ConflictManager<K,V>key - the key for which associated entries are to be returnedpublic Stream<Map<Address,CacheEntry<K,V>>> getConflicts()
ConflictManagergetConflicts in interface ConflictManager<K,V>public boolean isConflictResolutionInProgress()
isConflictResolutionInProgress in interface ConflictManager<K,V>public void resolveConflicts()
ConflictManagerConflictManager.getConflicts() to discover conflicts between Key replicas and utilises the configured
EntryMergePolicy to determine which entry should take precedence. The
resulting CacheEntry is then applied on all replicas in the cluster.resolveConflicts in interface ConflictManager<K,V>public void resolveConflicts(EntryMergePolicy<K,V> mergePolicy)
ConflictManagerConflictManager.getConflicts() to discover conflicts between Key replicas and utilises the provided
EntryMergePolicy to determine which entry should take precedence. The
resulting CacheEntry is then applied on all replicas in the cluster.resolveConflicts in interface ConflictManager<K,V>mergePolicy - the policy to be applied to all detected conflictspublic CompletionStage<Void> resolveConflicts(CacheTopology topology, Set<Address> preferredNodes)
resolveConflicts in interface InternalConflictManager<K,V>public void cancelConflictResolution()
cancelConflictResolution in interface InternalConflictManager<K,V>public boolean isStateTransferInProgress()
isStateTransferInProgress in interface ConflictManager<K,V>Copyright © 2022 JBoss by Red Hat. All rights reserved.