Cancels and removes a pending slot request with the given allocation id. If there is no such
pending request, then nothing is done.

@param allocationId identifying the pending slot request
@return True if a pending slot request was found; otherwise false
327675
public boolean unregisterSlotRequest(AllocationID allocationId) {
		checkInit();

		PendingSlotRequest pendingSlotRequest = pendingSlotRequests.remove(allocationId);

		if (null != pendingSlotRequest) {
			LOG.debug("Cancel slot request {}.", allocationId);

			cancelPendingSlotRequest(pendingSlotRequest);

			return true;
		} else {
			LOG.debug("No pending slot request with allocation id {} found. Ignoring unregistration request.", allocationId);

			return false;
		}
	}
645290
private final boolean removeSlot(final int slot) {
		if (slot < 0) {
			log.error("faking slot=" + slot + " allocated=" + allocated);
			return false;
		}
		if (slot < allocated) {
			moveElementsLeft(keys, slot);
		}
		if (allocated > 0) {
			allocated--;
		}
		if (log.isDebugEnabled()) {
			log.debug("erased up key=" + keys[allocated]);
		}
		keys[allocated] = NULL_VALUE;
		return true;
	}
572560
def allocation_used(self, state, allocation_id):
        '''
        
        '''
        return len(filter(lambda x: x.allocation_id == allocation_id,
                          state.partners.all)) > 0
595392
public static boolean isInitialAckDRId(long drId) {
        if (drId == -1) return true;
        int clusterId = getClusterIdFromDRId(drId);
        if (clusterId >= 0 && clusterId <= MAX_CLUSTER_ID) {
            return ((drId >>> 63) != 1L) && (getSequenceNumberFromDRId(drId) == MAX_SEQUENCE_NUMBER);
        }
        return false;
    }
1319470
public BoxRequestsFolder.DeleteFolder getDeleteRequest(String id) {
        BoxRequestsFolder.DeleteFolder request = new BoxRequestsFolder.DeleteFolder(id, getFolderInfoUrl(id), mSession);
        return request;
    }
96371
protected boolean removeRecursive(final K key, final int nodeid) {
		if (nodeid == Node.NULL_ID) {
			return false;  // NOT FOUND
		}
		Node<K, V> nodeDelete = getNode(nodeid);
		if (log.isDebugEnabled()) {
			log.debug("trying removeRecursive nodeDelete=" + nodeDelete + " key=" + key);
		}
		int slot = nodeDelete.findSlotByKey(key);
		if (nodeDelete.isLeaf()) {
			if (slot < 0) {
				if (log.isDebugEnabled()) {
					log.debug("NOT FOUND nodeDelete=" + nodeDelete + " key=" + key);
				}
				return false; // NOT FOUND
			}
			nodeDelete.remove(slot);
			putNode(nodeDelete);
			return true;
		}
		slot = ((slot < 0) ? (-slot) - 1 : slot + 1);
		final InternalNode<K, V> nodeDeleteInternal = (InternalNode<K, V>) nodeDelete;
		if (removeRecursive(key, nodeDeleteInternal.childs[slot])) {
			nodeDeleteInternal.checkUnderflow(slot);
			return true;
		}
		return false;
	}
463553
@Override
	public void notifyTimeout(AllocationID key, UUID ticket) {
		checkInit();

		if (slotActions != null) {
			slotActions.timeoutSlot(key, ticket);
		}
	}
1006249
public JsonResponse cancelSend(String sendId) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Send.PARAM_SEND_ID, sendId);
        return apiDelete(ApiAction.send, data);
    }
186050
private boolean discardDone(INodeFileUnderConstruction pendingFile,
                              String src) throws IOException {
    Block[] blocks = pendingFile.getBlocks();
    if (blocks == null || blocks.length == 0) {
      return false;
    }
    Block last = blocks[blocks.length-1];
    if (last.getNumBytes() == 0) {
      dir.removeBlock(src, pendingFile, last);
      finalizeINodeFileUnderConstruction(src, pendingFile);
      NameNode.stateChangeLog.warn("BLOCK*" +
          " internalReleaseLease: discarded last block " + last +
          " , lease removed for " +  src);
      return true;
    }
    return false;
  }
1024866
private CompletableFuture<LogicalSlot> allocateSharedSlot(
		SlotRequestId slotRequestId,
		ScheduledUnit scheduledUnit,
		SlotProfile slotProfile,
		boolean allowQueuedScheduling,
		Time allocationTimeout) {
		// allocate slot with slot sharing
		final SlotSharingManager multiTaskSlotManager = slotSharingManagers.computeIfAbsent(
			scheduledUnit.getSlotSharingGroupId(),
			id -> new SlotSharingManager(
				id,
				slotPool,
				this));

		final SlotSharingManager.MultiTaskSlotLocality multiTaskSlotLocality;
		try {
			if (scheduledUnit.getCoLocationConstraint() != null) {
				multiTaskSlotLocality = allocateCoLocatedMultiTaskSlot(
					scheduledUnit.getCoLocationConstraint(),
					multiTaskSlotManager,
					slotProfile,
					allowQueuedScheduling,
					allocationTimeout);
			} else {
				multiTaskSlotLocality = allocateMultiTaskSlot(
					scheduledUnit.getJobVertexId(),
					multiTaskSlotManager,
					slotProfile,
					allowQueuedScheduling,
					allocationTimeout);
			}
		} catch (NoResourceAvailableException noResourceException) {
			return FutureUtils.completedExceptionally(noResourceException);
		}

		// sanity check
		Preconditions.checkState(!multiTaskSlotLocality.getMultiTaskSlot().contains(scheduledUnit.getJobVertexId()));

		final SlotSharingManager.SingleTaskSlot leaf = multiTaskSlotLocality.getMultiTaskSlot().allocateSingleTaskSlot(
			slotRequestId,
			scheduledUnit.getJobVertexId(),
			multiTaskSlotLocality.getLocality());
		return leaf.getLogicalSlotFuture();
	}
68281
public void setAllocationIds(java.util.Collection<String> allocationIds) {
        if (allocationIds == null) {
            this.allocationIds = null;
            return;
        }

        this.allocationIds = new com.amazonaws.internal.SdkInternalList<String>(allocationIds);
    }
150060
protected boolean scheduleNewTask(String taskId) {
    // Put it to the pending start queue
    LOG.info(String.format("We are to schedule task: [%s]", taskId));

    // Update the tasksId
    int containerIndex = TaskUtils.getContainerIndexForTaskId(taskId);
    tasksId.put(containerIndex, taskId);

    // Re-schedule it
    toScheduleTasks.add(taskId);
    LOG.info(String.format("Added task: %s into the to-schedule-tasks queue: ", taskId));
    return true;
  }
579673
void removeFromInvalidates(String storageID) {
    LightWeightHashSet<Block> blocks = recentInvalidateSets.remove(storageID);
    if (blocks != null) {
      pendingDeletionBlocksCount -= blocks.size();
    }
  }
519429
public void cancelGrant(String nodeName, String sessionId, int requestId) {
    ClusterNode node = nameToNode.get(nodeName);
    if (node == null) {
      LOG.warn("Canceling grant for non-existent node: " + nodeName);
      return;
    }
    synchronized (node) {
      if (node.deleted) {
        LOG.warn("Canceling grant for deleted node: " + nodeName);
        return;
      }
      String hoststr = node.getClusterNodeInfo().getAddress().getHost();
      if (!canAllowNode(hoststr)) {
        LOG.warn("Canceling grant for excluded node: " + hoststr);
        return;
      }
      ResourceRequestInfo req = node.getRequestForGrant(sessionId, requestId);
      if (req != null) {
        ResourceRequest unitReq = Utilities.getUnitResourceRequest(
          req.getType());
        boolean previouslyRunnable = node.checkForGrant(unitReq, resourceLimit);
        node.cancelGrant(sessionId, requestId);
        loadManager.decrementLoad(req.getType());
        if (!previouslyRunnable && node.checkForGrant(unitReq, resourceLimit)) {
          RunnableIndices r = typeToIndices.get(req.getType());
          if (!faultManager.isBlacklisted(node.getName(), req.getType())) {
            r.addRunnable(node);
          }
        }
      }
    }
  }
472909
public boolean cancelTimer(final long timerId)
    {
        final int wheelIndex = tickForTimerId(timerId);
        final int arrayIndex = indexInTickArray(timerId);

        if (wheelIndex < wheel.length)
        {
            final long[] array = wheel[wheelIndex];

            if (arrayIndex < array.length && NULL_TIMER != array[arrayIndex])
            {
                array[arrayIndex] = NULL_TIMER;
                timerCount--;

                return true;
            }
        }

        return false;
    }
507283
def cancelRequest(self, requestId, reason=None, _=None):
        
        if reason is None:
            reason = CancelledError()
        tReq = self.requests.pop(requestId)
        tReq.d.errback(reason)
1092023
public boolean remove(BeanId id) // d129562
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "remove (" + id + ")");

        TimeoutElement elt = null;

        elt = ivStatefulBeanList.remove(id);

        synchronized (this) {
            if (elt != null) {
                numObjects--;
                numRemoves++;

                if (numObjects == 0) { // F743-33394
                    stopAlarm();
                }
            } else {
                numNullRemoves++;
            }
        }

        boolean result = elt != null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "remove (" + result + ")");
        return result; // d129562
    }