private void waitForFreeSlotAt(long sequence, Sequence[] dependentSequences, MutableLong minGatingSequence)
        {
            long wrapPoint = sequence - bufferSize;
            if (wrapPoint > minGatingSequence.get())
            {
            long minSequence;
            while (wrapPoint > (minSequence = Util.getMinimumSequence(dependentSequences)))
            {
                LockSupport.parkNanos(1000L);
            }

            minGatingSequence.set(minSequence);
            }
        }
        private void waitForCapacity(Sequence[] dependentSequences,  MutableLong minGatingSequence)
        {
            long wrapPoint = (claimSequence.get() + 1L) - bufferSize;
            if (wrapPoint > minGatingSequence.get())
            {
            long minSequence;
            while (wrapPoint > (minSequence = Util.getMinimumSequence(dependentSequences)))
            {
                LockSupport.parkNanos(1000L);
            }

            minGatingSequence.set(minSequence);
            }
        }