public interface ConflictManager<K,V>
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
isConflictResolutionInProgress() |
boolean |
isStateTransferInProgress() |
void |
resolveConflicts()
Utilises
getConflicts() to discover conflicts between Key replicas and utilises the configured
EntryMergePolicy to determine which entry should take precedence. |
void |
resolveConflicts(EntryMergePolicy<K,V> mergePolicy)
Utilises
getConflicts() to discover conflicts between Key replicas and utilises the provided
EntryMergePolicy to determine which entry should take precedence. |
Map<Address,InternalCacheValue<V>> getAllVersions(K key)
DistributionInfo.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.key
- the key for which associated entries are to be returnedCacheException
- if one or more versions of a key cannot be retrieved.Stream<Map<Address,CacheEntry<K,V>>> getConflicts()
IllegalStateException
- if called whilst a previous conflicts stream is still executing or state transfer is in progress.void resolveConflicts()
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.void resolveConflicts(EntryMergePolicy<K,V> mergePolicy)
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.mergePolicy
- the policy to be applied to all detected conflictsboolean isStateTransferInProgress()
boolean isConflictResolutionInProgress()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.