AllocationStrategy for internal use.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| AllocationStrategies | back to summary |
|---|---|
| pack-priv AllocationStrategies() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int | |
| pack-priv volatile int | |
| pack-priv static final AtomicIntegerFieldUpdater | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | estimatePermitCount()
Implements reactor. |
| public int | getPermits(int
the desired number of new resources desired)Implements reactor. desired positive number of new resources.
|
| public int | |
| public int | |
| public int | permitMinimum()
Implements reactor. 0 for scale-to-zero.
|
| public void | returnPermits(int returned)
Implements reactor. Pool, potentially leaving space
for N new ones to be allocated.
|
| public int | warmupParallelism()
Overrides default reactor. |
| max | back to summary |
|---|---|
| pack-priv final int max | |
| min | back to summary |
|---|---|
| pack-priv final int min | |
| permits | back to summary |
|---|---|
| pack-priv volatile int permits | |
| PERMITS | back to summary |
|---|---|
| pack-priv static final AtomicIntegerFieldUpdater<AllocationStrategies. | |
| warmupParallelism | back to summary |
|---|---|
| pack-priv final int warmupParallelism | |
| SizeBasedAllocationStrategy | back to summary |
|---|---|
| pack-priv SizeBasedAllocationStrategy(int min, int max) | |
| SizeBasedAllocationStrategy | back to summary |
|---|---|
| pack-priv SizeBasedAllocationStrategy(int min, int max, int warmupParallelism) | |
| 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 resources 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
For the warming up case, the typical pattern would be to call this method with a
| |
| permitGranted | back to summary |
|---|---|
| public int permitGranted() Implements reactor.
| |
| permitMaximum | back to summary |
|---|---|
| public int permitMaximum() Implements reactor.
| |
| 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 resources were discarded from the
Some strategy MIGHT throw an
| |
| warmupParallelism | back to summary |
|---|---|
| public int warmupParallelism() Overrides default reactor. Doc from reactor. Return the concurrency level used when the allocator is subscribed to during the warmup phase, if any.
The number of resources created concurrently will not exceed the value returned by Defaults to 1
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | estimatePermitCount()
Implements reactor. |
| public int | getPermits(int
the desired number of new resources desired)Implements reactor. desired positive number of new resources.
|
| public int | |
| public int | |
| public int | permitMinimum()
Implements reactor. 0 for scale-to-zero.
|
| public void | returnPermits(int returned)
Implements reactor. Pool, potentially leaving space
for N new ones to be allocated.
|
| UnboundedAllocationStrategy | back to summary |
|---|---|
| pack-priv UnboundedAllocationStrategy() | |
| 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 resources 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
For the warming up case, the typical pattern would be to call this method with a
| |
| permitGranted | back to summary |
|---|---|
| public int permitGranted() Implements reactor.
| |
| permitMaximum | back to summary |
|---|---|
| public int permitMaximum() Implements reactor.
| |
| 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 resources were discarded from the
Some strategy MIGHT throw an
| |