?? QueuePolicyOption
- ????????:
Serializable
,Comparable<QueuePolicyOption>
QueuePolicyOption
provides a standard set of simple
QueuePolicy
implementations.- ????:
-
??????
??????????Attempt to add the supplied event to the queue, blocking until the enqueue is successful.Attempt to add the supplied event to the queue.Attempt to add the supplied event to the queue, throwing an exception if the queue is full. -
????
??????????abstract <T,
U extends BlockingQueue<PushEvent<? extends T>>>
QueuePolicy<T,U> static QueuePolicyOption
?????????????????? ??????????????????? ????????(?????? ??????)static QueuePolicyOption[]
values()
???????????????, ??????????????
-
????????
-
DISCARD_OLDEST
Attempt to add the supplied event to the queue. If the queue is unable to immediately accept the value then discard the value at the head of the queue and try again. Repeat this process until the event is enqueued. -
BLOCK
Attempt to add the supplied event to the queue, blocking until the enqueue is successful. -
FAIL
Attempt to add the supplied event to the queue, throwing an exception if the queue is full.
-
-
??????
-
values
???????????????, ??????????????- ??:
- ???????????????????????????
-
valueOf
?????????????????? ??????????????????? ????????(?????? ??????)- ??:
name
- ????????????- ??:
- ?????????????
- ??:
IllegalArgumentException
- ??????????????????NullPointerException
- ???????
-
getPolicy
- ??:
- a
QueuePolicy
implementation
-