PushEvent
PushbackPolicy implementation that returns
zero back pressure until the buffer fills beyond the supplied threshold. Once
the threshold is reached back pressure is returned based on the supplied
parameters.
The starting level of the back pressure once the threshold is exceeded is
defined using the initial parameter. Additional back pressure is
applied for each queued item over the threshold. The amount of this
additional back pressure is defined by the increment parameter.
The following common use cases are supported:
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | ThresholdPushbackPolicy(int
the queue size limit after which back pressure will be
applied threshold, long the initial back pressure which defines the floor after
the threshold is exceeded initial, long the increments in which the pressure increases. increment)
|
| Modifier and Type | Method and Description |
|---|---|
| public static <T, U extends BlockingQueue | Returns: a newThresholdPushbackPolicythe queue size limit after which back pressure will be
applied threshold, long the increments in which the pressure increases increment)A simple configuration, where the increment size is used as the initial back pressure. |
| public static <T, U extends BlockingQueue | Returns: a newThresholdPushbackPolicythe queue size limit after which back pressure will be
applied threshold)A simple configuration with an initial back pressure of one and and increase increment size of one. |
| public static <T, U extends BlockingQueue | Returns: a newThresholdPushbackPolicythe queue size limit after which back pressure will be
applied threshold, long the initial back pressure which defines the floor after
the threshold is exceeded initial, long the increments in which the pressure increases. increment)Provides a |
| public long | pushback(U queue)
Implements org. Given the current state of the queue, determine the level of back pressure that should be applied |
| increment | back to summary |
|---|---|
| private final long increment | |
| initial | back to summary |
|---|---|
| private final long initial | |
| threshold | back to summary |
|---|---|
| private final int threshold | |
| ThresholdPushbackPolicy | back to summary |
|---|---|
private ThresholdPushbackPolicy(int threshold, long initial, long increment)
| |
| createIncrementalThresholdPushbackPolicy | back to summary |
|---|---|
| public static <T, U extends BlockingQueue A simple configuration, where the increment size is used as the initial back pressure.
| |
| createSimpleThresholdPushbackPolicy | back to summary |
|---|---|
| public static <T, U extends BlockingQueue A simple configuration with an initial back pressure of one and and increase increment size of one.
| |
| createThresholdPushbackPolicy | back to summary |
|---|---|
| public static <T, U extends BlockingQueue Provides a
| |
| pushback | back to summary |
|---|---|
| public long pushback(U queue) throws Exception Implements org. Doc from org. Given the current state of the queue, determine the level of back pressure that should be applied
| |