S - public class QuorumReadImpl<S extends HAReadGlue> extends QuorumStateChangeListenerBase implements QuorumRead<S>
QuorumRead implementation.| Modifier and Type | Field and Description |
|---|---|
protected QuorumMember<S> |
member |
| Constructor and Description |
|---|
QuorumReadImpl(QuorumMember<S> member) |
| Modifier and Type | Method and Description |
|---|---|
protected UUID |
getNextBadReadServiceId(UUID[] joinedServiceIds)
Return the
UUID of the joined service to which this service
will direct a failover read. |
byte[] |
readFromQuorum(UUID storeId,
long addr)
Used by any service joined with the quorum to read a record from another
service joined with the quorum in order to work around a "bad read" as
identified by a checksum error on the local service.
|
consensus, lostConsensus, memberAdd, memberRemove, pipelineAdd, pipelineChange, pipelineElectedLeader, pipelineRemove, pipelineUpstreamChange, quorumBreak, quorumMeet, serviceJoin, serviceLeaveprotected final QuorumMember<S extends HAReadGlue> member
public QuorumReadImpl(QuorumMember<S> member)
protected UUID getNextBadReadServiceId(UUID[] joinedServiceIds)
UUID of the joined service to which this service
will direct a failover read. The default implementation uses a
round-robin policy.public byte[] readFromQuorum(UUID storeId, long addr) throws InterruptedException, IOException
Note: This is NOT the normal path for reading on a record from a service. This is used to handle bad reads (when a checksum or IO error is reported by the local disk) by reading the record from another member of the quorum.
readFromQuorum in interface QuorumRead<S extends HAReadGlue>storeId - The UUID of the IRawStore from which the
record should be read.addr - The address of a record on that store.InterruptedExceptionIOExceptionHAGlue#readFromDisk(UUID, long)Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.