@Unstable public class TrafficShapingOptions extends Object
GlobalTrafficShapingHandler will handle traffic shaping.| Modifier and Type | Field and Description | 
|---|---|
| static long | DEFAULT_CHECK_INTERVALDefault check interval for stats = 1 second. | 
| static long | DEFAULT_INBOUND_GLOBAL_BANDWIDTH_LIMITDefault inbound bandwidth limit in bytes/sec = 0 (0 implies unthrottled) | 
| static long | DEFAULT_MAX_TIMEDefault max delay to wait = 15 seconds. | 
| static long | DEFAULT_OUTBOUND_GLOBAL_BANDWIDTH_LIMITDefault outbound bandwidth limit in bytes/sec = 0 (0 implies unthrottled) | 
| static long | DEFAULT_PEAK_OUTBOUND_GLOBAL_BANDWIDTHDefault peak outbound bandwidth limit in bytes/sec = 400 Mbps (aligns with netty's default in
  io.netty.handler.traffic.AbstractTrafficShapingHandler#DEFAULT_MAX_SIZE) | 
| Constructor and Description | 
|---|
| TrafficShapingOptions() | 
| TrafficShapingOptions(JsonObject json) | 
| TrafficShapingOptions(TrafficShapingOptions other) | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getCheckIntervalForStats() | 
| TimeUnit | getCheckIntervalForStatsTimeUnit() | 
| long | getInboundGlobalBandwidth() | 
| long | getMaxDelayToWait() | 
| TimeUnit | getMaxDelayToWaitTimeUnit() | 
| long | getOutboundGlobalBandwidth() | 
| long | getPeakOutboundGlobalBandwidth() | 
| TrafficShapingOptions | setCheckIntervalForStats(long checkIntervalForStats)Set the delay between two computations of performances for channels or 0 if no stats are to be computed | 
| TrafficShapingOptions | setCheckIntervalForStatsTimeUnit(TimeUnit checkIntervalForStatsTimeUnit)Set time unit for check interval for stats. | 
| TrafficShapingOptions | setInboundGlobalBandwidth(long inboundGlobalBandwidth)Set bandwidth limit in bytes per second for inbound connections | 
| TrafficShapingOptions | setMaxDelayToWait(long maxDelayToWaitTime)Set the maximum delay to wait in case of traffic excess | 
| TrafficShapingOptions | setMaxDelayToWaitUnit(TimeUnit maxDelayToWaitTimeUnit)Set the maximum delay to wait time unit | 
| TrafficShapingOptions | setOutboundGlobalBandwidth(long outboundGlobalBandwidth)Set bandwidth limit in bytes per second for outbound connections | 
| TrafficShapingOptions | setPeakOutboundGlobalBandwidth(long peakOutboundGlobalBandwidth)Set the maximum global write size in bytes per second allowed in the buffer globally for all channels before write
 suspended is set. | 
| JsonObject | toJson() | 
public static final long DEFAULT_INBOUND_GLOBAL_BANDWIDTH_LIMIT
public static final long DEFAULT_OUTBOUND_GLOBAL_BANDWIDTH_LIMIT
public static final long DEFAULT_PEAK_OUTBOUND_GLOBAL_BANDWIDTH
io.netty.handler.traffic.AbstractTrafficShapingHandler#DEFAULT_MAX_SIZE)public static final long DEFAULT_CHECK_INTERVAL
AbstractTrafficShapingHandler.DEFAULT_CHECK_INTERVAL)public static final long DEFAULT_MAX_TIME
AbstractTrafficShapingHandler.DEFAULT_MAX_TIME)public TrafficShapingOptions()
public TrafficShapingOptions(TrafficShapingOptions other)
public TrafficShapingOptions(JsonObject json)
public JsonObject toJson()
public TrafficShapingOptions setInboundGlobalBandwidth(long inboundGlobalBandwidth)
inboundGlobalBandwidth - bandwidth limitpublic TrafficShapingOptions setOutboundGlobalBandwidth(long outboundGlobalBandwidth)
outboundGlobalBandwidth - bandwidth limitpublic TrafficShapingOptions setMaxDelayToWait(long maxDelayToWaitTime)
maxDelayToWaitTime - maximum delay time for waitingpublic TrafficShapingOptions setMaxDelayToWaitUnit(TimeUnit maxDelayToWaitTimeUnit)
maxDelayToWaitTimeUnit - maximum delay time's unitpublic TrafficShapingOptions setCheckIntervalForStats(long checkIntervalForStats)
checkIntervalForStats - delay between two computations of performancespublic TrafficShapingOptions setCheckIntervalForStatsTimeUnit(TimeUnit checkIntervalForStatsTimeUnit)
checkIntervalForStatsTimeUnit - check interval for stats time unitpublic TrafficShapingOptions setPeakOutboundGlobalBandwidth(long peakOutboundGlobalBandwidth)
peakOutboundGlobalBandwidth - peak outbound bandwidthpublic long getInboundGlobalBandwidth()
public long getOutboundGlobalBandwidth()
public long getPeakOutboundGlobalBandwidth()
public long getMaxDelayToWait()
public TimeUnit getMaxDelayToWaitTimeUnit()
public long getCheckIntervalForStats()
public TimeUnit getCheckIntervalForStatsTimeUnit()
Copyright © 2024 Eclipse. All rights reserved.