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:
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, reqStatsFields inherited from class org.apache.bookkeeper.proto.PacketProcessorBaseV3
enqueueNanos, request, requestHandler, requestProcessor -
Constructor Summary
ConstructorsConstructorDescriptionLongPollReadEntryProcessorV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor, ExecutorService fenceThreadPool, ExecutorService longPollThreadPool, io.netty.util.HashedWheelTimer requestTimer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected Longprotected 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, toStringMethods inherited from class org.apache.bookkeeper.proto.PacketProcessorBaseV3
getHeader, isVersionCompatible, sendResponse
-
Constructor Details
-
LongPollReadEntryProcessorV3
LongPollReadEntryProcessorV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor, ExecutorService fenceThreadPool, ExecutorService longPollThreadPool, io.netty.util.HashedWheelTimer requestTimer)
-
-
Method Details
-
getPreviousLAC
- Overrides:
getPreviousLACin classReadEntryProcessorV3
-
readEntry
protected BookkeeperProtocol.ReadResponse readEntry(BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw) throws 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:
IOExceptionBookieException
-
executeOp
protected void executeOp()- Overrides:
executeOpin classReadEntryProcessorV3
-
update
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
-