public final class RepairingHandler extends Object
MetaDataContainer
s.
Used to repair Near Cache in the event of missed invalidation events or partition UUID changes.
Here repairing is done by making relevant Near Cache data unreachable.
To make stale data unreachable StaleReadDetectorImpl
is used.
An instance of this class is created per Near Cache and can concurrently be used by many threads.
StaleReadDetectorImpl
Constructor and Description |
---|
RepairingHandler(ILogger logger,
String localUuid,
String name,
NearCache nearCache,
SerializationService serializationService,
MinimalPartitionService partitionService) |
Modifier and Type | Method and Description |
---|---|
void |
checkOrRepairSequence(int partition,
long nextSequence,
boolean viaAntiEntropy)
Checks
nextSequence against current one. |
void |
checkOrRepairUuid(int partition,
UUID newUuid) |
MetaDataContainer |
getMetaDataContainer(int partition) |
String |
getName() |
void |
handle(Collection<Data> keys,
Collection<String> sourceUuids,
Collection<UUID> partitionUuids,
Collection<Long> sequences)
Handles batch invalidations
|
void |
handle(Data key,
String sourceUuid,
UUID partitionUuid,
long sequence)
Handles a single invalidation
|
void |
initSequence(int partitionID,
long partitionSequence) |
void |
initUuid(int partitionID,
UUID partitionUuid) |
String |
toString() |
void |
updateLastKnownStaleSequence(MetaDataContainer metaData,
int partition) |
public RepairingHandler(ILogger logger, String localUuid, String name, NearCache nearCache, SerializationService serializationService, MinimalPartitionService partitionService)
public MetaDataContainer getMetaDataContainer(int partition)
public void handle(Data key, String sourceUuid, UUID partitionUuid, long sequence)
public void handle(Collection<Data> keys, Collection<String> sourceUuids, Collection<UUID> partitionUuids, Collection<Long> sequences)
public String getName()
public void updateLastKnownStaleSequence(MetaDataContainer metaData, int partition)
public void checkOrRepairUuid(int partition, UUID newUuid)
public void checkOrRepairSequence(int partition, long nextSequence, boolean viaAntiEntropy)
nextSequence
against current one. And updates current sequence if next one is bigger.public void initUuid(int partitionID, UUID partitionUuid)
public void initSequence(int partitionID, long partitionSequence)
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.