Marks a {@link ShareRequest} as failed to process.

@param id the id of the {@link ShareRequest}.
@return true if successful; false otherwise.
184606
public synchronized boolean markFailed(int id) {
        boolean isSuccessful = false;

        SQLiteDatabase db = null;
        Cursor cursor = null;
        try {
            db = getWritableDatabase();

            // Get number of times this record has already failed to process.
            cursor = db.query(ShareRequestTable.NAME, new String[]{ShareRequestTable.COLUMN_FAILS},
                    WHERE_CLAUSE_BY_ID, new String[]{String.valueOf(id)}, null, null, null);
            if (cursor != null && cursor.moveToFirst()) {
                int fails = cursor.getInt(cursor.getColumnIndex(ShareRequestTable.COLUMN_FAILS));

                // Reset state back to pending and increment fails.
                ContentValues values = new ContentValues();
                values.put(ShareRequestTable.COLUMN_STATE, ShareRequest.STATE_PENDING);
                values.put(ShareRequestTable.COLUMN_FAILS, fails + 1);

                isSuccessful = db.update(ShareRequestTable.NAME, values, WHERE_CLAUSE_BY_ID,
                        new String[]{String.valueOf(id)}) > 0;

                sLogger.log(WingsDbHelper.class, "markFailed", "isSuccessful=" + isSuccessful + " id=" + id);
            }
        } catch (SQLException e) {
            // Do nothing.
        } finally {
            if (cursor != null) {
                cursor.close();
            }
            db.close();
        }

        return isSuccessful;
    }
997624
public boolean check(int id) {
    for (Tag tag: getTags()) {
      if (tag.getID() == id)
	return true;
    }
    return false;
  }
672205
public void setHtmlElementId(String id) {
		htmlElementId = id;
		mapWidget.setHtmlElement(DOM.getElementById(id));
		mapWidget.draw();
	}
1250929
private boolean checkID(long id) {
    // Ensure that the given ID is a monotonically increasing ID.
    // If the ID is less than the last received ID then reset the
    // last received ID since the connection must have been reset.
    if (lastReceived == 0 || id == lastReceived + 1 || id < lastReceived) {
      lastReceived = id;
      // If the ID reaches the end of the current batch then tell the data
      // source that it's okay to remove all previous messages.
      if (lastReceived % BATCH_SIZE == 0) {
        ack();
      }
      return true;
    } else {
      fail();
    }
    return false;
  }
268168
protected synchronized boolean contains(Object id) {
        boolean found = false;
        if (this.explicitBuffer.containsKey(id) || this.scanBuffer.contains(id)) {
            found = true;
        }
        return found;
    }
112154
public BoxRequestsComment.DeleteComment getDeleteRequest(String id) {
        BoxRequestsComment.DeleteComment request = new BoxRequestsComment.DeleteComment(id, getCommentInfoUrl(id), mSession);
        return request;
    }
354462
public boolean removeDestination(String id) {
		logger.trace("removing destination {}", id);
		for(Destination<M> destination : destinations) {
			if(destination.getId().equals(id)) {
				destinations.remove(destination);
				return true;
			}
		}
		return false;
	}
110856
public BoxRequestsBookmark.UpdateSharedBookmark getCreateSharedLinkRequest(String id) {
        BoxRequestsBookmark.UpdateSharedBookmark request = new BoxRequestsBookmark.UpdateSharedBookmark(id, getBookmarkInfoUrl(id), mSession)
                .setAccess(null);
        return request;
    }
655271
static boolean killProcess(final String processName, int id) {
        int pid;
        try {
            pid = processUtils.resolveProcessId(processName, id);
            if(pid > 0) {
                try {
                    Runtime.getRuntime().exec(processUtils.getKillCommand(pid));
                    return true;
                } catch (Throwable t) {
                    ProcessLogger.ROOT_LOGGER.debugf(t, "failed to kill process '%s' with pid '%s'", processName, pid);
                }
            }
        } catch (Throwable t) {
            ProcessLogger.ROOT_LOGGER.debugf(t, "failed to resolve pid of process '%s'", processName);
        }
        return false;
    }
719496
public boolean isReadOnlyRequest( final String requestId ) {
        if ( _log.isDebugEnabled() ) {
            _log.debug( "Asked for readonly request: " + requestId + " ("+ _readOnlyRequests.containsKey( requestId ) +")" );
        }
        // TODO: add some threshold
        return _readOnlyRequests.containsKey( requestId );
    }
1281457
public BoxRequestsBookmark.DeleteBookmark getDeleteRequest(String id) {
        BoxRequestsBookmark.DeleteBookmark request = new BoxRequestsBookmark.DeleteBookmark(id, getBookmarkInfoUrl(id), mSession);
        return request;
    }
579682
public void fail(String requestId) throws TException
    {
        int index = this.requestedMap.remove(requestId);
        DRPCInvocationsClient client = this.clients.get(index);
        client.failRequest(requestId);
    }
1121723
private boolean containsElmentWithId(Node node, String id) {
        String nodeName = node.getNodeName();
        if ("channel".equals(nodeName) || "folder".equals(nodeName)) {
            Element e = (Element) node;
            if (id.equals(e.getAttribute("ID"))) {
                return true;
            }
            if ("folder".equals(nodeName)) {
                for (Node child = e.getFirstChild();
                        child != null;
                        child = child.getNextSibling()) {
                    if (containsElmentWithId(child, id)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
747502
function(id) {
            var itemLimit = this._currentItemLimit,
                fileName;

            if (this._preventRetries[id]) {
                this.log("Retries are forbidden for id " + id, "warn");
                return false;
            }
            else if (this._handler.isValid(id)) {
                fileName = this.getName(id);

                if (this._options.callbacks.onManualRetry(id, fileName) === false) {
                    return false;
                }

                if (itemLimit > 0 && this._netUploadedOrQueued + 1 > itemLimit) {
                    this._itemError("retryFailTooManyItems");
                    return false;
                }

                this.log("Retrying upload for '" + fileName + "' (id: " + id + ")...");
                return true;
            }
            else {
                this.log("'" + id + "' is not a valid file ID", "error");
                return false;
            }
        }
71703
public void retryLastFailedTask(String workflowId) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        stub.retryWorkflow(WorkflowServicePb.RetryWorkflowRequest.newBuilder()
                .setWorkflowId(workflowId)
                .build()
        );
    }
270216
public boolean lock(String id) {
    File file = new File(directory, String.format(".%s.lock", prefix));
    try {
      if (file.createNewFile()) {
        try (FileBuffer buffer = FileBuffer.allocate(file)) {
          buffer.writeString(id).flush();
        }
        return true;
      } else {
        try (FileBuffer buffer = FileBuffer.allocate(file)) {
          String lock = buffer.readString();
          return lock != null && lock.equals(id);
        }
      }
    } catch (IOException e) {
      throw new StorageException("Failed to acquire storage lock");
    }
  }
645368
private boolean isELReserved(String id) {
        int i = 0;
        int j = reservedWords.length;
        while (i < j) {
            int k = (i + j) / 2;
            int result = reservedWords[k].compareTo(id);
            if (result == 0) {
                return true;
            }
            if (result < 0) {
                i = k + 1;
            } else {
                j = k;
            }
        }
        return false;
    }