Package org.apache.bookkeeper.proto
Class PacketProcessorBaseV3
- java.lang.Object
-
- org.apache.bookkeeper.proto.PacketProcessorBaseV3
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
ForceLedgerProcessorV3,GetBookieInfoProcessorV3,GetListOfEntriesOfLedgerProcessorV3,ReadEntryProcessorV3,ReadLacProcessorV3,WriteEntryProcessorV3,WriteLacProcessorV3
public abstract class PacketProcessorBaseV3 extends java.lang.Object implements java.lang.RunnableA base class for bookkeeper protocol v3 packet processors.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longenqueueNanos(package private) BookkeeperProtocol.Requestrequest(package private) BookieRequestHandlerrequestHandler(package private) BookieRequestProcessorrequestProcessor
-
Constructor Summary
Constructors Constructor Description PacketProcessorBaseV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BookkeeperProtocol.BKPacketHeadergetHeader()Build a header with protocol version 3 and the operation type same as what was in the request.protected booleanisVersionCompatible()protected voidsendResponse(BookkeeperProtocol.StatusCode code, java.lang.Object response, OpStatsLogger statsLogger)java.lang.StringtoString()
-
-
-
Field Detail
-
request
final BookkeeperProtocol.Request request
-
requestHandler
final BookieRequestHandler requestHandler
-
requestProcessor
final BookieRequestProcessor requestProcessor
-
enqueueNanos
final long enqueueNanos
-
-
Constructor Detail
-
PacketProcessorBaseV3
public PacketProcessorBaseV3(BookkeeperProtocol.Request request, BookieRequestHandler requestHandler, BookieRequestProcessor requestProcessor)
-
-
Method Detail
-
sendResponse
protected void sendResponse(BookkeeperProtocol.StatusCode code, java.lang.Object response, OpStatsLogger statsLogger)
-
isVersionCompatible
protected boolean isVersionCompatible()
-
getHeader
protected BookkeeperProtocol.BKPacketHeader getHeader()
Build a header with protocol version 3 and the operation type same as what was in the request.- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-