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.Runnable
A base class for bookkeeper protocol v3 packet processors.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
enqueueNanos
(package private) BookkeeperProtocol.Request
request
(package private) BookieRequestHandler
requestHandler
(package private) BookieRequestProcessor
requestProcessor
-
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.BKPacketHeader
getHeader()
Build a header with protocol version 3 and the operation type same as what was in the request.protected boolean
isVersionCompatible()
protected void
sendResponse(BookkeeperProtocol.StatusCode code, java.lang.Object response, OpStatsLogger statsLogger)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-