Interface Rejector<E>

All Known Implementing Classes:
AbortPolicy, DiscardOldestPolicy, DiscardPolicy

public interface Rejector<E>
RejectHandler, it works when you need to custom reject action.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    reject(E e, Queue<E> queue)
    Method that may be invoked by a Queue when Queue has remained memory return true.
  • Method Details

    • reject

      void reject(E e, Queue<E> queue)
      Method that may be invoked by a Queue when Queue has remained memory return true. This may occur when no more memory are available because their bounds would be exceeded.

      In the absence of other alternatives, the method may throw an unchecked RejectException, which will be propagated to the caller.

      Parameters:
      e - the element requested to be added
      queue - the queue attempting to add this element
      Throws:
      RejectException - if there is no more memory