Interface IQueueEnqueue

  • All Known Subinterfaces:
    IQueue
    All Known Implementing Classes:
    QueueEnqueueImpl

    public interface IQueueEnqueue
    Queue enqueing semantics
    • Method Detail

      • enqueue

        void enqueue​(Event event)
              throws QueueException
        Enqueue a given Event onto the underlying queue
        Parameters:
        event - the Event to enqueue
        Throws:
        QueueException - thrown if event cannot be enqueued
      • enqueue

        void enqueue​(Event[] events)
              throws QueueException
        Enqueue a set of events Event onto the underlying queue
        Parameters:
        events - the Events to enqueue
        Throws:
        QueueException - thrown if events cannot be enqueued
      • enqueue_prepare

        Object enqueue_prepare​(Event[] events)
                        throws QueueException
        Prepare an enqueue of a set of Event instances. The Object returned should subsequently be used to either commit the prepared enqueue transaction (enqueue_commit(Object), or to abort the prepared enqueue transaction enqueue_abort(Object)
        Parameters:
        events - the events to enqueue
        Returns:
        Object representing the transaction
        Throws:
        QueueException - if preparation for enqueue cannot occur
      • enqueue_lossy

        boolean enqueue_lossy​(Event event)
        Enqueue the given event with lossy enqueuing.
        Parameters:
        event - the event to
        Returns:
        true if enqueued successfully, false if not
      • setEnqueueProcessor

        void setEnqueueProcessor​(IEnqueueProcessor processor)
        Set enqueue processor for this queue. The given processor, if non-null, will be consulted when and enqueue operation is requested to determine whether the enqueue should occur or not
        Parameters:
        processor - the IEnqueueProcessor for this queue. Should not be null.
      • size

        int size()
        Return size of contents in queue
        Returns:
        int size of queue contents. Zero if empty