Class BlobTransferGlobalTrafficShapingHandlerHolder

java.lang.Object
com.linkedin.davinci.blobtransfer.BlobTransferGlobalTrafficShapingHandlerHolder

public class BlobTransferGlobalTrafficShapingHandlerHolder extends Object
Singleton holder for the GlobalChannelTrafficShapingHandler. This class provides a thread-safe way to access a single instance of the global traffic shaping handler that can be shared across all network channels of blob transfer in both server and client side to enforce global rate limits.
  • Method Details

    • getGlobalChannelTrafficShapingHandlerInstance

      public static io.netty.handler.traffic.GlobalChannelTrafficShapingHandler getGlobalChannelTrafficShapingHandlerInstance(long readLimit, long writeLimit)
      Gets the singleton instance of GlobalChannelTrafficShapingHandler. Handler is lazily created on first access.
      Parameters:
      readLimit - maximum number of bytes to read per second
      writeLimit - maximum number of bytes to write per second
      Returns:
      the global traffic shaping handler