Package org.apache.bookkeeper.proto
Class LongPollReadEntryProcessorV3
- java.lang.Object
-
- org.apache.bookkeeper.proto.PacketProcessorBaseV3
-
- org.apache.bookkeeper.proto.ReadEntryProcessorV3
-
- org.apache.bookkeeper.proto.LongPollReadEntryProcessorV3
-
- All Implemented Interfaces:
java.lang.Runnable,Watcher<LastAddConfirmedUpdateNotification>
class LongPollReadEntryProcessorV3 extends ReadEntryProcessorV3 implements Watcher<LastAddConfirmedUpdateNotification>
Processor handling long poll read entry request.
-
-
Field Summary
-
Fields inherited from class org.apache.bookkeeper.proto.ReadEntryProcessorV3
entryId, lastPhaseStartTime, ledgerId, readRequest, readStats, reqStats
-
Fields inherited from class org.apache.bookkeeper.proto.PacketProcessorBaseV3
enqueueNanos, request, requestHandler, requestProcessor
-
-
Constructor Summary
Constructors Constructor Description LongPollReadEntryProcessorV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor, java.util.concurrent.ExecutorService fenceThreadPool, java.util.concurrent.ExecutorService longPollThreadPool, io.netty.util.HashedWheelTimer requestTimer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecuteOp()protected java.lang.LonggetPreviousLAC()protected BookkeeperProtocol.ReadResponsereadEntry(BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw)Read a specific entry.voidupdate(LastAddConfirmedUpdateNotification newLACNotification)This method is called whenever the watched object is changed.-
Methods inherited from class org.apache.bookkeeper.proto.ReadEntryProcessorV3
buildResponse, getReadResponse, handleReadResultForFenceRead, readEntry, registerEvent, registerFailedEvent, registerSuccessfulEvent, run, sendResponse, toString
-
Methods inherited from class org.apache.bookkeeper.proto.PacketProcessorBaseV3
getHeader, isVersionCompatible, sendResponse
-
-
-
-
Constructor Detail
-
LongPollReadEntryProcessorV3
LongPollReadEntryProcessorV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor, java.util.concurrent.ExecutorService fenceThreadPool, java.util.concurrent.ExecutorService longPollThreadPool, io.netty.util.HashedWheelTimer requestTimer)
-
-
Method Detail
-
getPreviousLAC
protected java.lang.Long getPreviousLAC()
- Overrides:
getPreviousLACin classReadEntryProcessorV3
-
readEntry
protected BookkeeperProtocol.ReadResponse readEntry(BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw) throws java.io.IOException, BookieException
Description copied from class:ReadEntryProcessorV3Read a specific entry.- Overrides:
readEntryin classReadEntryProcessorV3- Parameters:
readResponseBuilder- read response builder.entryId- entry to readstartTimeSw- stop watch to measure the read operation.- Returns:
- read response or null if it is a fence read operation.
- Throws:
java.io.IOExceptionBookieException
-
executeOp
protected void executeOp()
- Overrides:
executeOpin classReadEntryProcessorV3
-
update
public void update(LastAddConfirmedUpdateNotification newLACNotification)
Description copied from interface:WatcherThis method is called whenever the watched object is changed. An application calls an Watchable object'snotifyWatchersmethod to have all the object's watchers notified of the change.- Specified by:
updatein interfaceWatcher<LastAddConfirmedUpdateNotification>- Parameters:
newLACNotification- the updated value of a watchable
-
-