Class PriorityQueueImpl

    • Method Detail

      • reenqueueMessageForPriorityChange

        public long reenqueueMessageForPriorityChange​(long messageId,
                                                      int newPriority)
        Description copied from interface: PriorityQueue
        Re-enqueue the message with given id as a new message with priority changed to specified one.
        The operation results in a deletion of original message and creation of new message which is a copy of original one except for different message id and priority.
        Specified by:
        reenqueueMessageForPriorityChange in interface PriorityQueue<PriorityQueueImpl>
        Parameters:
        messageId - message id
        newPriority - new priority
        Returns:
        new message id, or -1 if message is not found or priority is not changed
      • reenqueueMessagesForPriorityChange

        public List<Long> reenqueueMessagesForPriorityChange​(String selector,
                                                             int newPriority)
        Description copied from interface: PriorityQueue
        Re-enqueue the messages matching given selector expression as a new messages having priority changed to specified one.
        Using null or an empty filter will change all messages from this queue.
        The operation results in a deletion of original messages and creation of new messages having the same properties and content as original ones except for different message id and priority.
        Specified by:
        reenqueueMessagesForPriorityChange in interface PriorityQueue<PriorityQueueImpl>
        Parameters:
        selector - selector expression
        newPriority - new priority
        Returns:
        the list containing ids of re-enqueed message s