Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#8161 add mod and xml config to configure RetainableByteBufferPool
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
jetty-server/src/main/config/etc/jetty-retainablebytebufferpool.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd"> | ||
|
||
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.io.ArrayRetainableByteBufferPool"> | ||
<Arg type="int"><Property name="jetty.retainableByteBufferPool.minCapacity" default="0"/></Arg> | ||
<Arg type="int"><Property name="jetty.retainableByteBufferPool.factor" default="-1"/></Arg> | ||
<Arg type="int"><Property name="jetty.retainableByteBufferPool.maxCapacity" default="-1"/></Arg> | ||
<Arg type="int"><Property name="jetty.retainableByteBufferPool.maxBucketSize" default="2147483647"/></Arg> | ||
<Arg type="long"><Property name="jetty.retainableByteBufferPool.maxHeapMemory" default="0"/></Arg> | ||
<Arg type="long"><Property name="jetty.retainableByteBufferPool.maxDirectMemory" default="0"/></Arg> | ||
</New> | ||
</Arg> | ||
</Call> | ||
</Configure> |
31 changes: 31 additions & 0 deletions
31
jetty-server/src/main/config/modules/retainablebytebufferpool.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[description] | ||
Configures the RetainableByteBufferPool used by ServerConnectors. | ||
|
||
[tags] | ||
retainableByteBufferPool | ||
|
||
[xml] | ||
etc/jetty-retainablebytebufferpool.xml | ||
|
||
[ini-template] | ||
## Minimum capacity of a single ByteBuffer. | ||
#jetty.retainableByteBufferPool.minCapacity=0 | ||
|
||
## Maximum capacity of a single ByteBuffer. | ||
## Requests for ByteBuffers larger than this value results | ||
## in the ByteBuffer being allocated but not pooled. | ||
#jetty.retainableByteBufferPool.maxCapacity=65536 | ||
|
||
## Bucket capacity factor. | ||
## ByteBuffers are allocated out of buckets that have | ||
## a capacity that is multiple of this factor. | ||
#jetty.retainableByteBufferPool.factor=1024 | ||
|
||
## Maximum size for each bucket. | ||
#jetty.retainableByteBufferPool.maxBucketSize=2147483647 | ||
|
||
## Maximum heap memory retainable by the pool (0 for heuristic, -1 for unlimited). | ||
#jetty.retainableByteBufferPool.maxHeapMemory=0 | ||
|
||
## Maximum direct memory retainable by the pool (0 for heuristic, -1 for unlimited). | ||
#jetty.retainableByteBufferPool.maxDirectMemory=0 |