protected synchronized boolean schedule(DLockRequestMessage request) {
      if (!grantor.dm.isCurrentMember(request.getSender())) {
        grantor.cleanupSuspendState(request);
        return false;
      }

      if (!isGranted(false) && !hasWaitingRequests()) {
        // don't need to schedule... just grant it
        if (grantLockToRequest(request)) {
          return true;
        }
      }

      // add the request to the sorted set...
      if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {
        logger.trace(LogMarker.DLS_VERBOSE, "[DLockGrantToken.schedule] {} scheduling: {}", this,
            request);
      }
      if (pendingRequests == null) {
        pendingRequests = new LinkedList();
        dlock.getStats().incRequestQueues(1);
      }
      pendingRequests.add(request);
      dlock.getStats().incPendingRequests(1);
      return true;
    }
Schedules the lock request for immediate or later granting of lock. This will grant the lock
if it is available, otherwise it will add the request at the end of the pending requests
queue.
<p>
Synchronizes on this grant token.

@param request the request to grant or schedule
@return true if the lock request was immediately granted
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockGrantor.java