Class ByteTrackerExtent

    • Constructor Detail

      • ByteTrackerExtent

        public ByteTrackerExtent​(long min,
                                 long nextMin)
        Create a simple marker extent
        Parameters:
        min - the first logical cycle to be returned by this tracker
        nextMin - the first logical cycle of the next range
      • ByteTrackerExtent

        public ByteTrackerExtent​(long min,
                                 int[] ints)
    • Method Detail

      • markResult

        public long markResult​(long cycle,
                               int result)
        mark the named cycle in the extent, or in any future extent that we know. The return value determines the known state of the current extent:
        1. negative value: indicates an attempt to mark a value outside the range, either before min or after max of the furthest known extent
        2. zero: indicates successful marking, but exactly no remaining space available. This is how a marking thread can detect that it was the one that finished marking an extent.
        3. positive value: indicates how many cycles remain available in the extent to be marked.
        Parameters:
        cycle - The cycle to be marked
        result - the result code to mark in the cycle
        Returns:
        the number of cycles remaining after marking, or a negative number indicating an error.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isFullyFilled

        public boolean isFullyFilled()
      • getNextExtent

        public java.util.concurrent.atomic.AtomicReference<ByteTrackerExtent> getNextExtent()
      • extend

        public ByteTrackerExtent extend()
        Find the last known extent, and add another after it, account for contiguous ranges and extent getCount. Note that this does not mean necessarily that the extent will be added immediately after the current one.
        Returns:
        The new extent that was created.
      • getMin

        public long getMin()
      • getSize

        public int getSize()
      • getChainSize

        public int getChainSize()
      • rangeSummary

        public java.lang.String rangeSummary()