Package org.apache.bookkeeper.client
Class ReadOpBase
- java.lang.Object
-
- org.apache.bookkeeper.client.ReadOpBase
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
BatchedReadOp
,PendingReadOp
public abstract class ReadOpBase extends java.lang.Object implements java.lang.Runnable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ReadOpBase.LedgerEntryRequest
protected static class
ReadOpBase.ReadContext
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowFailFast
protected ClientContext
clientCtx
protected java.util.concurrent.atomic.AtomicBoolean
complete
(package private) long
endEntryId
protected java.util.concurrent.CompletableFuture<LedgerEntries>
future
protected java.util.Set<BookieId>
heardFromHosts
protected java.util.BitSet
heardFromHostsBitSet
protected boolean
isRecoveryRead
(package private) LedgerHandle
lh
(package private) long
numPendingEntries
protected long
requestTimeNanos
protected int
requiredBookiesMissingEntryForRecovery
protected java.util.Set<BookieId>
sentToHosts
protected java.util.concurrent.ScheduledFuture<?>
speculativeTask
protected long
startEntryId
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReadOpBase(LedgerHandle lh, ClientContext clientCtx, long startEntryId, long endEntryId, boolean isRecoveryRead)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
allowFailFastOnUnwritableChannel()
protected void
cancelSpeculativeTask(boolean mayInterruptIfRunning)
(package private) java.util.concurrent.CompletableFuture<LedgerEntries>
future()
protected LedgerMetadata
getLedgerMetadata()
java.util.concurrent.ScheduledFuture<?>
getSpeculativeTask()
(package private) abstract void
initiate()
void
run()
void
submit()
protected abstract void
submitCallback(int code)
-
-
-
Field Detail
-
speculativeTask
protected java.util.concurrent.ScheduledFuture<?> speculativeTask
-
future
protected final java.util.concurrent.CompletableFuture<LedgerEntries> future
-
heardFromHosts
protected final java.util.Set<BookieId> heardFromHosts
-
heardFromHostsBitSet
protected final java.util.BitSet heardFromHostsBitSet
-
sentToHosts
protected final java.util.Set<BookieId> sentToHosts
-
lh
LedgerHandle lh
-
clientCtx
protected ClientContext clientCtx
-
startEntryId
protected final long startEntryId
-
requestTimeNanos
protected long requestTimeNanos
-
requiredBookiesMissingEntryForRecovery
protected final int requiredBookiesMissingEntryForRecovery
-
isRecoveryRead
protected final boolean isRecoveryRead
-
complete
protected final java.util.concurrent.atomic.AtomicBoolean complete
-
allowFailFast
protected boolean allowFailFast
-
numPendingEntries
long numPendingEntries
-
endEntryId
final long endEntryId
-
-
Constructor Detail
-
ReadOpBase
protected ReadOpBase(LedgerHandle lh, ClientContext clientCtx, long startEntryId, long endEntryId, boolean isRecoveryRead)
-
-
Method Detail
-
getLedgerMetadata
protected LedgerMetadata getLedgerMetadata()
-
cancelSpeculativeTask
protected void cancelSpeculativeTask(boolean mayInterruptIfRunning)
-
getSpeculativeTask
public java.util.concurrent.ScheduledFuture<?> getSpeculativeTask()
-
future
java.util.concurrent.CompletableFuture<LedgerEntries> future()
-
allowFailFastOnUnwritableChannel
void allowFailFastOnUnwritableChannel()
-
submit
public void submit()
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
initiate
abstract void initiate()
-
submitCallback
protected abstract void submitCallback(int code)
-
-