Interface RRingBuffer<V>

    • Method Detail

      • trySetCapacity

        boolean trySetCapacity​(int capacity)
        Sets capacity of the queue only if it wasn't set before.
        Parameters:
        capacity - - queue capacity
        Returns:
        true if capacity set successfully false if capacity already set
      • setCapacity

        void setCapacity​(int capacity)
        Sets capacity of the queue and overrides current value. Trims queue if previous capacity value was greater than new.
        Parameters:
        capacity - - queue capacity
      • remainingCapacity

        int remainingCapacity()
        Returns remaining capacity of this queue
        Returns:
        remaining capacity
      • capacity

        int capacity()
        Returns capacity of this queue
        Returns:
        queue capacity