Skip to content

Commit

Permalink
[#5712] Allow clients to override userDefinedWritabilityIndex from Ab…
Browse files Browse the repository at this point in the history
…stractTrafficShapingHandler

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.
  • Loading branch information
normanmaurer committed Sep 2, 2016
1 parent 30fe2e8 commit 2771ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -145,7 +145,7 @@ void setTrafficCounter(TrafficCounter newTrafficCounter) {
* 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) {
Expand Down
Expand Up @@ -156,7 +156,7 @@ void createGlobalTrafficCounter(ScheduledExecutorService executor) {
}

@Override
int userDefinedWritabilityIndex() {
protected int userDefinedWritabilityIndex() {
return AbstractTrafficShapingHandler.GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX;
}

Expand Down

0 comments on commit 2771ac7

Please sign in to comment.