Class BlobTransferGlobalTrafficShapingHandlerHolder
java.lang.Object
com.linkedin.davinci.blobtransfer.BlobTransferGlobalTrafficShapingHandlerHolder
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 Summary
Modifier and TypeMethodDescriptionstatic io.netty.handler.traffic.GlobalChannelTrafficShapingHandler
getGlobalChannelTrafficShapingHandlerInstance
(long readLimit, long writeLimit) Gets the singleton instance of GlobalChannelTrafficShapingHandler.
-
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 secondwriteLimit
- maximum number of bytes to write per second- Returns:
- the global traffic shaping handler
-