Package org.apache.bookkeeper.proto
Class RequestUtils
- java.lang.Object
-
- org.apache.bookkeeper.proto.RequestUtils
-
class RequestUtils extends java.lang.Object
Utilities for requests.
-
-
Constructor Summary
Constructors Constructor Description RequestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
hasFlag(BookkeeperProtocol.AddRequest request, BookkeeperProtocol.AddRequest.Flag flag)
(package private) static boolean
hasFlag(BookkeeperProtocol.ReadRequest request, BookkeeperProtocol.ReadRequest.Flag flag)
static boolean
isFenceRequest(BookkeeperProtocol.ReadRequest readRequest)
static boolean
isHighPriority(BookkeeperProtocol.Request request)
static boolean
isLongPollReadRequest(BookkeeperProtocol.ReadRequest readRequest)
static boolean
shouldPiggybackEntry(BookkeeperProtocol.ReadRequest readRequest)
static java.lang.String
toSafeString(BookkeeperProtocol.Request request)
this toSafeString method filters out body and masterKey from the output.
-
-
-
Method Detail
-
isFenceRequest
public static boolean isFenceRequest(BookkeeperProtocol.ReadRequest readRequest)
-
isLongPollReadRequest
public static boolean isLongPollReadRequest(BookkeeperProtocol.ReadRequest readRequest)
-
isHighPriority
public static boolean isHighPriority(BookkeeperProtocol.Request request)
-
shouldPiggybackEntry
public static boolean shouldPiggybackEntry(BookkeeperProtocol.ReadRequest readRequest)
-
hasFlag
static boolean hasFlag(BookkeeperProtocol.ReadRequest request, BookkeeperProtocol.ReadRequest.Flag flag)
-
hasFlag
static boolean hasFlag(BookkeeperProtocol.AddRequest request, BookkeeperProtocol.AddRequest.Flag flag)
-
toSafeString
public static java.lang.String toSafeString(BookkeeperProtocol.Request request)
this toSafeString method filters out body and masterKey from the output. masterKey contains the password of the ledger and body is customer data, so it is not appropriate to have these in logs or system output.
-
-