public abstract class AbstractReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>> extends java.lang.Object implements ReadRepair<E,P>
ReadRepair.Factory
Modifier and Type | Field and Description |
---|---|
protected ColumnFamilyStore |
cfs |
protected ReadCommand |
command |
protected long |
queryStartNanoTime |
protected ReplicaPlan.Shared<E,P> |
replicaPlan |
Constructor and Description |
---|
AbstractReadRepair(ReadCommand command,
ReplicaPlan.Shared<E,P> replicaPlan,
long queryStartNanoTime) |
Modifier and Type | Method and Description |
---|---|
void |
awaitReads()
Block on the reads (or timeout) sent out in
ReadRepair.startRepair(org.apache.cassandra.service.reads.DigestResolver<E, P>, java.util.function.Consumer<org.apache.cassandra.db.partitions.PartitionIterator>) |
void |
maybeSendAdditionalReads()
if it looks like we might not receive data requests from everyone in time, send additional requests
to additional replicas not contacted in the initial full data read.
|
protected P |
replicaPlan() |
void |
startRepair(DigestResolver<E,P> digestResolver,
java.util.function.Consumer<PartitionIterator> resultConsumer)
Called when the digests from the initial read don't match.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitWrites, create, getMergeListener, maybeSendAdditionalWrites, repairPartition
protected final ReadCommand command
protected final long queryStartNanoTime
protected final ReplicaPlan.Shared<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>> replicaPlan
protected final ColumnFamilyStore cfs
public AbstractReadRepair(ReadCommand command, ReplicaPlan.Shared<E,P> replicaPlan, long queryStartNanoTime)
protected P replicaPlan()
public void startRepair(DigestResolver<E,P> digestResolver, java.util.function.Consumer<PartitionIterator> resultConsumer)
ReadRepair
startRepair
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
digestResolver
- supplied so we can get the original data responseresultConsumer
- hook for the repair to set it's result on completionpublic void awaitReads() throws ReadTimeoutException
ReadRepair
ReadRepair.startRepair(org.apache.cassandra.service.reads.DigestResolver<E, P>, java.util.function.Consumer<org.apache.cassandra.db.partitions.PartitionIterator>)
awaitReads
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
ReadTimeoutException
public void maybeSendAdditionalReads()
ReadRepair
maybeSendAdditionalReads
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
Copyright © 2009- The Apache Software Foundation