Interface RPriorityQueue<V>

    • Method Detail

      • comparator

        Comparator<? super V> comparator()
        Returns comparator used by this queue
        Returns:
        comparator object
      • readAll

        List<V> readAll()
        Returns all queue elements at once
        Specified by:
        readAll in interface RQueue<V>
        Returns:
        elements
      • pollLastAndOfferFirstTo

        V pollLastAndOfferFirstTo​(String queueName)
        Retrieves and removes last available tail element of this queue queue and adds it at the head of queueName.
        Specified by:
        pollLastAndOfferFirstTo in interface RQueue<V>
        Parameters:
        queueName - - names of destination queue
        Returns:
        the tail of this queue, or null if the specified waiting time elapses before an element is available
      • trySetComparator

        boolean trySetComparator​(Comparator<? super V> comparator)
        Sets new comparator only if current set is empty
        Parameters:
        comparator - for values
        Returns:
        true if new comparator setted false otherwise