@Override
  public final boolean offer(final M value, 
                             final long timeout, 
                             final TimeUnit unit)
  {
    Objects.requireNonNull(value);
    
    // completePoll();
    
    final AtomicLong headRef = _headRef;
    final AtomicLong tailRef = _tail;
    final int capacity = _capacity;
    
    while (true) {
      // final AtomicReferenceArray<T> ring = _ring;
      final long tail = tailRef.get();
      final long head = headRef.get();
      final long nextHead = head + 1;

      if (nextHead - tail < capacity) {
        _ring.setLazy(head, value);
        headRef.lazySet(nextHead);

        return true;
      }
      else {
        long offerSequence = _blocker.nextOfferSequence();
        
        if (capacity <= headRef.get() + 1 - tailRef.get()
            && ! _blocker.offerWait(offerSequence, timeout, unit)) {
          return false;
        }
      }
    }
  }
@ Override public final boolean offer ( final M value , final long timeout , final TimeUnit unit ) { Objects . requireNonNull ( value ) ; final AtomicLong headRef = _headRef ; final AtomicLong tailRef = _tail ; final int capacity = _capacity ; while ( true ) { final long tail = tailRef . get ( ) ; final long head = headRef . get ( ) ; final long nextHead = head + 1 ; if ( nextHead - tail < capacity ) { _ring . setLazy ( head , value ) ; headRef . lazySet ( nextHead ) ; return true ; } else { long offerSequence = _blocker . nextOfferSequence ( ) ; if ( capacity <= headRef . get ( ) + 1 - tailRef . get ( ) && ! _blocker . offerWait ( offerSequence , timeout , unit ) ) { return false ; } } } }
/*
private final M getAndClear(long ptr)
{
return _ring.takeAndClear(ptr);
}

private final boolean isSet(long ptr)
{
return _ring.get(ptr) != null;
}