code: public T put(T t, long timeoutInMillis, int maximumCapacity) throws InterruptedException {
          if ((t == null) || (maximumCapacity > buffer.length)) {
              throw new IllegalArgumentException();
          }
  
          long start = (timeoutInMillis <= 0) ? 0 : -1;
          long waitTime = timeoutInMillis;
  
          //TODO: Add expedited put/fix waiting logic
  
          // D312598 - begin
          T ret = null;
          while (true) {
              synchronized (lock) {
                  if (numberOfUsedSlots.get() < maximumCapacity) {
                      insert(t);
                      numberOfUsedSlots.getAndIncrement();
                      ret = t;
                  }
              }
  
              if (ret != null) {
                  notifyGet_();
                  return ret;
              }
  
              if (start == -1)
                  start = System.currentTimeMillis();
  
              int spinctr = SPINS_PUT_;
              while (numberOfUsedSlots.get() >= buffer.length) {
                  if (waitTime <= 0) {
                      return null;
                  }
                  // busy wait
                  if (spinctr > 0) {
                      if (YIELD_PUT_)
                          Thread.yield();
                      spinctr--;
                  } else {
                      // block on lock
                      waitPut_(timeoutInMillis);
                  }
                  waitTime = timeoutInMillis - (System.currentTimeMillis() - start);
              }
          }
          // D312598 - end
  
      }
docs: Puts an object into the buffer. If the buffer is at or above the
  specified maximum capacity, the call will block for up to the
  specified timeout period.
  
  @param x the object being placed in the buffer.
  @param timeoutInMillis the timeout period in milliseconds.
  @param maximumCapacity the desired maximum capacity of the buffer
  @return the object that was put into the buffer (x) or
  null in the event that the request timed out.
  @exception IllegalArgumentException if the object is null or if the
  supplied maximum capacity exceeds the buffer's size.