@@ -63,8 +63,10 @@ public class Http2Protocol implements UpgradeProtocol {
6363 // Maximum amount of streams which can be concurrently executed over
6464 // a single connection
6565 static final int DEFAULT_MAX_CONCURRENT_STREAM_EXECUTION = 20 ;
66-
66+ // Default factor used when adjusting overhead count for overhead frames
6767 static final int DEFAULT_OVERHEAD_COUNT_FACTOR = 10 ;
68+ // Default factor used when adjusting overhead count for reset frames
69+ static final int DEFAULT_OVERHEAD_RESET_FACTOR = 50 ;
6870 // Not currently configurable. This makes the practical limit for
6971 // overheadCountFactor to be ~20. The exact limit will vary with traffic
7072 // patterns.
@@ -98,6 +100,7 @@ public class Http2Protocol implements UpgradeProtocol {
98100 private int maxTrailerCount = Constants .DEFAULT_MAX_TRAILER_COUNT ;
99101 private int maxTrailerSize = Constants .DEFAULT_MAX_TRAILER_SIZE ;
100102 private int overheadCountFactor = DEFAULT_OVERHEAD_COUNT_FACTOR ;
103+ private int overheadResetFactor = DEFAULT_OVERHEAD_RESET_FACTOR ;
101104 private int overheadContinuationThreshold = DEFAULT_OVERHEAD_CONTINUATION_THRESHOLD ;
102105 private int overheadDataThreshold = DEFAULT_OVERHEAD_DATA_THRESHOLD ;
103106 private int overheadWindowUpdateThreshold = DEFAULT_OVERHEAD_WINDOW_UPDATE_THRESHOLD ;
@@ -339,6 +342,20 @@ public void setOverheadCountFactor(int overheadCountFactor) {
339342 }
340343
341344
345+ public int getOverheadResetFactor () {
346+ return overheadResetFactor ;
347+ }
348+
349+
350+ public void setOverheadResetFactor (int overheadResetFactor ) {
351+ if (overheadResetFactor < 0 ) {
352+ this .overheadResetFactor = 0 ;
353+ } else {
354+ this .overheadResetFactor = overheadResetFactor ;
355+ }
356+ }
357+
358+
342359 public int getOverheadContinuationThreshold () {
343360 return overheadContinuationThreshold ;
344361 }
0 commit comments