[#5712] Allow clients to override userDefinedWritabilityIndex from AbstractTrafficShapingHandler
Motivation: AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline. Modifications: Mark method protected. Result: Easier to extend AbstractTrafficShapingHandler.
This commit is contained in:
parent
4af6855695
commit
147d427adc
@ -145,7 +145,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
||||
* for GlobalChannel TSH it is defined as
|
||||
* {@value #GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX}.
|
||||
*/
|
||||
int userDefinedWritabilityIndex() {
|
||||
protected int userDefinedWritabilityIndex() {
|
||||
if (this instanceof GlobalChannelTrafficShapingHandler) {
|
||||
return GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX;
|
||||
} else if (this instanceof GlobalTrafficShapingHandler) {
|
||||
|
@ -156,7 +156,7 @@ public class GlobalChannelTrafficShapingHandler extends AbstractTrafficShapingHa
|
||||
}
|
||||
|
||||
@Override
|
||||
int userDefinedWritabilityIndex() {
|
||||
protected int userDefinedWritabilityIndex() {
|
||||
return AbstractTrafficShapingHandler.GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user