ConnectionProvider.AllocationStrategy .
This class is based on https://github.com/reactor/reactor-pool/blob/d5cb5b72cdbcbbee8d781e06972c4da21766107f/src/main/java/reactor/pool/AllocationStrategies.java#L73
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | |
| pack-priv final int | |
| pack-priv final int | |
| pack-priv volatile int | |
| pack-priv static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static Http2AllocationStrategy. | Returns: a newHttp2AllocationStrategy.Creates a builder for |
| public Http2AllocationStrategy | copy()
Implements reactor. |
| public int | estimatePermitCount()
Implements reactor. |
| public int | getPermits(int
the desired number of new connections desired)Implements reactor. desired positive number of new connections.
|
| public long | Returns: the configured maximum number of the concurrent streams that can be opened to the remote peerReturns the configured maximum number of the concurrent streams that can be opened to the remote peer. |
| public int | permitGranted()
Implements reactor. Integer#MAX_VALUE.
|
| public int | permitMaximum()
Implements reactor. Integer#MAX_VALUE for unbounded.
|
| public int | permitMinimum()
Implements reactor. 0 for scale-to-zero.
|
| public void | returnPermits(int returned)
Implements reactor. |
| maxConcurrentStreams | back to summary |
|---|---|
| pack-priv final long maxConcurrentStreams | |
| maxConnections | back to summary |
|---|---|
| pack-priv final int maxConnections | |
| minConnections | back to summary |
|---|---|
| pack-priv final int minConnections | |
| permits | back to summary |
|---|---|
| pack-priv volatile int permits | |
| PERMITS | back to summary |
|---|---|
| pack-priv static final AtomicIntegerFieldUpdater<Http2AllocationStrategy> PERMITS | |
| Http2AllocationStrategy | back to summary |
|---|---|
| pack-priv Http2AllocationStrategy(Http2AllocationStrategy. | |
| Http2AllocationStrategy | back to summary |
|---|---|
| pack-priv Http2AllocationStrategy(Http2AllocationStrategy copy) | |
| builder | back to summary |
|---|---|
| public static Http2AllocationStrategy. Creates a builder for | |
| copy | back to summary |
|---|---|
| public Http2AllocationStrategy copy() Implements reactor. Doc from reactor. Returns a deep copy of this instance.
| |
| estimatePermitCount | back to summary |
|---|---|
| public int estimatePermitCount() Implements reactor. Doc from reactor. Best-effort peek at the state of the strategy which indicates roughly how many more connections can currently be
allocated. Should be paired with
| |
| getPermits | back to summary |
|---|---|
| public int getPermits(int desired) Implements reactor. Doc from reactor. Try to get the permission to allocate a
| |
| maxConcurrentStreams | back to summary |
|---|---|
| public long maxConcurrentStreams() Returns the configured maximum number of the concurrent streams that can be opened to the remote peer.
| |
| permitGranted | back to summary |
|---|---|
| public int permitGranted() Implements reactor. Doc from reactor. Returns the best estimate of the number of permits currently granted, between 0 and
| |
| permitMaximum | back to summary |
|---|---|
| public int permitMaximum() Implements reactor. Doc from reactor. Returns the maximum number of permits this strategy can grant in total, or
| |
| permitMinimum | back to summary |
|---|---|
| public int permitMinimum() Implements reactor. Doc from reactor. Return the minimum number of permits this strategy tries to maintain granted
(reflecting a minimal size for the pool), or
| |
| returnPermits | back to summary |
|---|---|
| public void returnPermits(int returned) Implements reactor. Doc from reactor. Update the strategy to indicate that N connections were discarded, potentially leaving space for N new ones to be allocated. Users MUST ensure that this method isn't called with a value greater than the number of held permits it has.
Some strategy MIGHT throw an
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv long | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Http2AllocationStrategy | build()
Implements reactor. Http2AllocationStrategy.
|
| public Http2AllocationStrategy. | maxConcurrentStreams(long
the maximum number of the concurrent streams that can be opened to the remote peer maxConcurrentStreams)Implements reactor. |
| public Http2AllocationStrategy. | maxConnections(int
the maximum number of live connections to keep in the pool maxConnections)Implements reactor. |
| public Http2AllocationStrategy. | minConnections(int minConnections)
Implements reactor. |
| DEFAULT_MAX_CONCURRENT_STREAMS | back to summary |
|---|---|
| pack-priv static final long DEFAULT_MAX_CONCURRENT_STREAMS | |
| DEFAULT_MAX_CONNECTIONS | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MAX_CONNECTIONS | |
| DEFAULT_MIN_CONNECTIONS | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MIN_CONNECTIONS | |
| maxConcurrentStreams | back to summary |
|---|---|
| pack-priv long maxConcurrentStreams | |
| maxConnections | back to summary |
|---|---|
| pack-priv int maxConnections | |
| minConnections | back to summary |
|---|---|
| pack-priv int minConnections | |
| Build | back to summary |
|---|---|
| pack-priv Build() | |
| build | back to summary |
|---|---|
| public Http2AllocationStrategy build() Implements reactor. Doc from reactor. Build a new
| |
| maxConcurrentStreams | back to summary |
|---|---|
| public Http2AllocationStrategy. Implements reactor. Doc from reactor. Configures the maximum number of the concurrent streams that can be opened to the remote peer.
When evaluating how many streams can be opened to the remote peer,
the minimum of this configuration and the remote peer configuration is taken (unless -1 is used).
Default to
| |
| maxConnections | back to summary |
|---|---|
| public Http2AllocationStrategy. Implements reactor. Doc from reactor. Configures the maximum number of live connections to keep in the pool.
Default to
| |
| minConnections | back to summary |
|---|---|
| public Http2AllocationStrategy. Implements reactor. Doc from reactor. Configures the minimum number of live connections to keep in the pool (can be the best effort).
Default to
| |
| Modifier and Type | Method and Description |
|---|---|
| public Http2AllocationStrategy | |
| public Http2AllocationStrategy. | Returns: thisthe maximum number of the concurrent streams that can be opened to the remote peer maxConcurrentStreams)Configures the maximum number of the concurrent streams that can be opened to the remote peer. |
| public Http2AllocationStrategy. | Returns: thisthe maximum number of live connections to keep in the pool maxConnections)Configures the maximum number of live connections to keep in the pool. |
| public Http2AllocationStrategy. | Returns: thisConfigures the minimum number of live connections to keep in the pool (can be the best effort). |
| build | back to summary |
|---|---|
| public Http2AllocationStrategy build() Build a new
| |
| maxConcurrentStreams | back to summary |
|---|---|
| public Http2AllocationStrategy. Configures the maximum number of the concurrent streams that can be opened to the remote peer.
When evaluating how many streams can be opened to the remote peer,
the minimum of this configuration and the remote peer configuration is taken (unless -1 is used).
Default to
| |
| maxConnections | back to summary |
|---|---|
| public Http2AllocationStrategy. Configures the maximum number of live connections to keep in the pool.
Default to
| |
| minConnections | back to summary |
|---|---|
| public Http2AllocationStrategy. Configures the minimum number of live connections to keep in the pool (can be the best effort).
Default to
| |