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 void
executeOp()
protected java.lang.Long
getPreviousLAC()
protected BookkeeperProtocol.ReadResponse
readEntry(BookkeeperProtocol.ReadResponse.Builder readResponseBuilder, long entryId, com.google.common.base.Stopwatch startTimeSw)
Read a specific entry.void
update(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:
getPreviousLAC
in 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:ReadEntryProcessorV3
Read a specific entry.- Overrides:
readEntry
in 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.IOException
BookieException
-
executeOp
protected void executeOp()
- Overrides:
executeOp
in classReadEntryProcessorV3
-
update
public void update(LastAddConfirmedUpdateNotification newLACNotification)
Description copied from interface:Watcher
This method is called whenever the watched object is changed. An application calls an Watchable object'snotifyWatchers
method to have all the object's watchers notified of the change.- Specified by:
update
in interfaceWatcher<LastAddConfirmedUpdateNotification>
- Parameters:
newLACNotification
- the updated value of a watchable
-
-