Class 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​(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest request, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag flag)  
      (package private) static boolean hasFlag​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest request, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag)  
      static boolean isFenceRequest​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)  
      static boolean isHighPriority​(org.apache.bookkeeper.proto.BookkeeperProtocol.Request request)  
      static boolean isLongPollReadRequest​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)  
      static boolean shouldPiggybackEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)  
      static java.lang.String toSafeString​(org.apache.bookkeeper.proto.BookkeeperProtocol.Request request)
      this toSafeString method filters out body and masterKey from the output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestUtils

        RequestUtils()
    • Method Detail

      • isFenceRequest

        public static boolean isFenceRequest​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)
      • isLongPollReadRequest

        public static boolean isLongPollReadRequest​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)
      • isHighPriority

        public static boolean isHighPriority​(org.apache.bookkeeper.proto.BookkeeperProtocol.Request request)
      • shouldPiggybackEntry

        public static boolean shouldPiggybackEntry​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest)
      • hasFlag

        static boolean hasFlag​(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest request,
                               org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag)
      • hasFlag

        static boolean hasFlag​(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest request,
                               org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag flag)
      • toSafeString

        public static java.lang.String toSafeString​(org.apache.bookkeeper.proto.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.