Class BookieRequestProcessor

  • All Implemented Interfaces:
    java.lang.AutoCloseable, RequestProcessor

    public class BookieRequestProcessor
    extends java.lang.Object
    implements RequestProcessor
    An implementation of the RequestProcessor interface.
    • Field Detail

      • bookie

        final Bookie bookie
        This is the Bookie instance that is used to handle all read and write requests.
      • addsSemaphore

        final java.util.concurrent.Semaphore addsSemaphore
      • readsSemaphore

        final java.util.concurrent.Semaphore readsSemaphore
      • blacklistedChannels

        final java.util.Optional<<,​java.lang.Boolean>> blacklistedChannels
      • onResponseTimeout

        final java.util.function.Consumer<> onResponseTimeout
    • Method Detail

      • onAddRequestStart

        protected void onAddRequestStart​( channel)
      • onAddRequestFinish

        protected void onAddRequestFinish()
      • onReadRequestStart

        protected void onReadRequestStart​( channel)
      • onReadRequestFinish

        protected void onReadRequestFinish()
      • maxAddsInProgressCount

        int maxAddsInProgressCount()
      • maxReadsInProgressCount

        int maxReadsInProgressCount()
      • close

        public void close()
        Description copied from interface: RequestProcessor
        Close the request processor.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface RequestProcessor
      • processRequest

        public void processRequest​(java.lang.Object msg,
        Description copied from interface: RequestProcessor
        Process request.
        Specified by:
        processRequest in interface RequestProcessor
        msg - request to process
        c - channel received the given request r
      • getWaitTimeoutOnBackpressureMillis

        public long getWaitTimeoutOnBackpressureMillis()
      • blacklistChannel

        public void blacklistChannel​( channel)
      • invalidateBlacklist

        public void invalidateBlacklist​( channel)
      • isBlacklisted

        public boolean isBlacklisted​( channel)
      • handleNonWritableChannel

        public void handleNonWritableChannel​( channel)
      • getServerCfg

        ServerConfiguration getServerCfg()
        The server configuration. We use this for getting the number of add and read worker threads.
      • isPreserveMdcForTaskExecution

        boolean isPreserveMdcForTaskExecution()
      • getBookie

        Bookie getBookie()
        This is the Bookie instance that is used to handle all read and write requests.
      • getReadThreadPool

        OrderedExecutor getReadThreadPool()
        The threadpool used to execute all read entry requests issued to this server.
      • getWriteThreadPool

        OrderedExecutor getWriteThreadPool()
        The threadpool used to execute all add entry requests issued to this server.
      • getLongPollThreadPool

        OrderedExecutor getLongPollThreadPool()
        The threadpool used to execute all long poll requests issued to this server after they are done waiting.
      • getHighPriorityThreadPool

        OrderedExecutor getHighPriorityThreadPool()
        The threadpool used to execute high priority requests.
      • getRequestTimer

        io.netty.util.HashedWheelTimer getRequestTimer()
        The Timer used to time out requests for long polling.
      • isStatsEnabled

        boolean isStatsEnabled()
      • getAddsSemaphore

        java.util.concurrent.Semaphore getAddsSemaphore()
      • getReadsSemaphore

        java.util.concurrent.Semaphore getReadsSemaphore()
      • getBlacklistedChannels

        java.util.Optional<<,​java.lang.Boolean>> getBlacklistedChannels()
      • getOnResponseTimeout

        java.util.function.Consumer<> getOnResponseTimeout()
      • getAllocator

        io.netty.buffer.ByteBufAllocator getAllocator()
      • isThrottleReadResponses

        boolean isThrottleReadResponses()