public ByteBufferSharing open(final long time, final TimeUnit unit)
      throws OpenAttemptTimedOut, IOException {
    try {
      if (!lock.tryLock(time, unit)) {
        throw new OpenAttemptTimedOut();
      }
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new OpenAttemptTimedOut();
    }
    addReferenceAfterLock();
    return sharing;
  }
This variant throws {@link OpenAttemptTimedOut} if it can't acquire the lock in time.
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferVendor.java