?? PushbackPolicyOption
- ????????:
Serializable
,Comparable<PushbackPolicyOption>
PushbackPolicyOption
provides a standard set of simple
PushbackPolicy
implementations.- ????:
-
??????
??????????Returns a fixed amount of back pressure, independent of how full the buffer isReturns zero back pressure when the buffer is empty, then it returns a linearly increasing amount of back pressure based on how full the buffer is.Returns zero back pressure until the buffer is full, then it returns an exponentially increasing amount, starting with the supplied value and doubling it each time.Returns zero back pressure until the buffer is full, then it returns a fixed value -
????
??????????abstract <T,
U extends BlockingQueue<PushEvent<? extends T>>>
PushbackPolicy<T,U> getPolicy
(long value) Create aPushbackPolicy
instance configured with a base back pressure time in nanoseconds The actual backpressure returned will vary based on the selected implementation, the base value, and the state of the buffer.static PushbackPolicyOption
?????????????????? ??????????????????? ????????(?????? ??????)static PushbackPolicyOption[]
values()
???????????????, ??????????????
-
????????
-
FIXED
Returns a fixed amount of back pressure, independent of how full the buffer is -
ON_FULL_FIXED
Returns zero back pressure until the buffer is full, then it returns a fixed value -
ON_FULL_EXPONENTIAL
Returns zero back pressure until the buffer is full, then it returns an exponentially increasing amount, starting with the supplied value and doubling it each time. Once the buffer is no longer full the back pressure returns to zero. -
LINEAR
Returns zero back pressure when the buffer is empty, then it returns a linearly increasing amount of back pressure based on how full the buffer is. The maximum value will be returned when the buffer is full.
-
-
??????
-
values
???????????????, ??????????????- ??:
- ???????????????????????????
-
valueOf
?????????????????? ??????????????????? ????????(?????? ??????)- ??:
name
- ????????????- ??:
- ?????????????
- ??:
IllegalArgumentException
- ??????????????????NullPointerException
- ???????
-
getPolicy
public abstract <T,U extends BlockingQueue<PushEvent<? extends T>>> PushbackPolicy<T,U> getPolicy(long value) Create aPushbackPolicy
instance configured with a base back pressure time in nanoseconds The actual backpressure returned will vary based on the selected implementation, the base value, and the state of the buffer.- ??:
value
-- ??:
- A
PushbackPolicy
to use
-