Sets the replication status for delete markers. Delete markers are not replicated if status is Disabled.

@param status New replication status.
@return This object for method chaining.
197881
public DeleteMarkerReplication withStatus(DeleteMarkerReplicationStatus status) {
        setStatus(status == null ? null : status.toString());
        return this;
    }
1122986
public void setReplicationRunList(java.util.Collection<ReplicationRun> replicationRunList) {
        if (replicationRunList == null) {
            this.replicationRunList = null;
            return;
        }

        this.replicationRunList = new java.util.ArrayList<ReplicationRun>(replicationRunList);
    }
1338752
public function setStatus(string $status = "E") : CNabuDataObject
    {
        if ($status === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$status")
            );
        }
        $this->setValue('nb_user_group_status', $status);
        
        return $this;
    }
38847
public HttpClientResponseBuilder withStatus(int statusCode) {
        Action lastAction = newRule.getLastAction();
        StatusResponse statusAction = new StatusResponse(lastAction, statusCode);
        newRule.overrideLastAction(statusAction);
        return this;
    }
1176922
public function setStatus($status)
    {
        $allowed_values = array('active', 'paused', 'ready', 'delivered', 'cancelled', 'reverted');
        if ((!in_array($status, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'active', 'paused', 'ready', 'delivered', 'cancelled', 'reverted'");
        }
        $this->container['status'] = $status;

        return $this;
    }
1277836
@Override
   @ManagedOperation(description = "Resets statistics gathered by this component", displayName = "Reset statistics")
   public void resetStatistics() {
      replicationCount.set(0);
      replicationFailures.set(0);
      totalReplicationTime.set(0);
      syncXSiteReplicationTime = new DefaultSimpleStat();
      asyncXSiteCounter.reset();
   }
1065508
public function setStatus($status)
    {
        if (!empty($status) && ctype_print($status)) {
            $this->status = trim($status);
        }

        return $this;
    }
1360841
PollingState<T> withStatus(String status, int statusCode) throws IllegalArgumentException {
        if (status == null) {
            throw new IllegalArgumentException("Status is null.");
        }
        this.status = status;
        this.statusCode = statusCode;
        return this;
    }
298376
public ItemRequest<ProjectStatus> delete(String projectStatus) {

        String path = String.format("/project_statuses/%s", projectStatus);
        return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "DELETE");
    }
1040404
def _set_status(self, status, ex=None):
        '''  '''
        self._status = status
        logger.debug("Set status(%s) for %s" % (self._status, self.session_id))
        self.set_done()
        if ex:
            self._exception = ex
386230
public int blockReplication(String[] argv, int idx) throws IOException {
    DistributedFileSystem dfs = getDFS();
    if (dfs == null) {
      System.out.println("FileSystem is " + getFS().getUri());
      return -1;
    }
    String option = argv[idx];
    boolean isEnable = true;
    if (option.equals("enable")) {
      isEnable = true;
    } else if (option.equals("disable")) {
      isEnable = false;
    } else {
      printUsage("-blockReplication");
      return -1;
    }
    dfs.blockReplication(isEnable);
    System.out.println("Block Replication is "  + (isEnable? "enabled" : "disabled")
        + " on server " + dfs.getUri());
    return 0;
  }
739294
public function setStatus($status)
    {
        if (!in_array($status, array(
            self::STATUS_ACTIVE,
            self::STATUS_INACTIVE,
        ))) {
            throw new \InvalidArgumentException("Invalid status in ".get_class($this).".");
        }

        $this->status = $status;

        return $this;
    }
762264
protected Boolean parseInstanceStatus(InstanceStatus status) {
		if (status == null) {
			return null;
		}
		return status == InstanceStatus.UP;
	}
546634
public function setStatus($status) {
        if (!in_array($status, array(self::STATUS_INACTIVE, self::STATUS_PUBLISHED))) {
            throw new \InvalidArgumentException("Invalid status");
        }
        $this->status = $status;
    }
485505
@Patch("/status")
    @Consumes("application/json-patch+json")
    @RequiresAdministrator
    public CompletableFuture<ServerStatus> updateStatus(ServiceRequestContext ctx,
                                                        JsonNode patch) throws Exception {
        // TODO(trustin): Consider extracting this into common utility or Armeria.
        final ServerStatus oldStatus = status();
        final JsonNode oldValue = Jackson.valueToTree(oldStatus);
        final JsonNode newValue;
        try {
            newValue = JsonPatch.fromJson(patch).apply(oldValue);
        } catch (JsonPatchException e) {
            // Failed to apply the given JSON patch.
            return rejectStatusPatch(patch);
        }

        if (!newValue.isObject()) {
            return rejectStatusPatch(patch);
        }

        final JsonNode writableNode = newValue.get("writable");
        final JsonNode replicatingNode = newValue.get("replicating");
        if (!writableNode.isBoolean() || !replicatingNode.isBoolean()) {
            return rejectStatusPatch(patch);
        }

        final boolean writable = writableNode.asBoolean();
        final boolean replicating = replicatingNode.asBoolean();
        if (writable && !replicating) {
            return HttpApiUtil.throwResponse(ctx, HttpStatus.BAD_REQUEST,
                                             "'replicating' must be 'true' if 'writable' is 'true'.");
        }

        if (oldStatus.writable) {
            if (!writable) { // writable -> unwritable
                executor().setWritable(false);
                if (replicating) {
                    logger.warn("Entered read-only mode with replication enabled");
                    return CompletableFuture.completedFuture(status());
                } else {
                    logger.warn("Entering read-only mode with replication disabled ..");
                    return executor().stop().handle((unused, cause) -> {
                        if (cause != null) {
                            logger.warn("Failed to stop the command executor:", cause);
                        } else {
                            logger.info("Entered read-only mode with replication disabled");
                        }
                        return status();
                    });
                }
            }
        } else if (writable) { // unwritable -> writable
            logger.warn("Leaving read-only mode ..");
            executor().setWritable(true);
            return executor().start().handle((unused, cause) -> {
                if (cause != null) {
                    logger.warn("Failed to leave read-only mode:", cause);
                } else {
                    logger.info("Left read-only mode");
                }
                return status();
            });
        }

        throw HttpStatusException.of(HttpStatus.NOT_MODIFIED);
    }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
1167647
public void setReplicaUpdates(java.util.Collection<ReplicaUpdate> replicaUpdates) {
        if (replicaUpdates == null) {
            this.replicaUpdates = null;
            return;
        }

        this.replicaUpdates = new java.util.ArrayList<ReplicaUpdate>(replicaUpdates);
    }