Set the status of this instance. Application can use this to indicate
whether it is ready to receive traffic. Setting the status here also notifies all registered listeners
of a status change event.

@param status Status of the instance
546191
public synchronized void setInstanceStatus(InstanceStatus status) {
        InstanceStatus next = instanceStatusMapper.map(status);
        if (next == null) {
            return;
        }

        InstanceStatus prev = instanceInfo.setStatus(next);
        if (prev != null) {
            for (StatusChangeListener listener : listeners.values()) {
                try {
                    listener.notify(new StatusChangeEvent(prev, next));
                } catch (Exception e) {
                    logger.warn("failed to notify listener: {}", listener.getId(), e);
                }
            }
        }
    }
1104692
public void setRunningStatusIfNecessary() {
        if (ConnectionStatus.TRANSACTION != status.get() && ConnectionStatus.RUNNING != status.get()) {
            status.getAndSet(ConnectionStatus.RUNNING);
        }
    }
1318897
private void finishStatus(MtasSolrStatus status) {
		if (!status.finished()) {
			status.setFinished();
			if (requestHandler != null) {
				try {
					requestHandler.finishStatus(status);
				} catch (IOException e) {
					log.error(e);
				}
			}
		}
	}
133951
public void setStatus(final ConnectionStatus update) {
        status.getAndSet(update);
        if (ConnectionStatus.TERMINATED == status.get()) {
            resourceSynchronizer.doNotify();
        }
    }
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
606794
public function setStatus(StatusInterface $status = null)
    {
        $this->status = null;
        $this->statusChanged = true;
        if ($status instanceof StatusInterface) {
            $this->status = EmbedStatus::createFromStatus($status);
        }
    }
1067896
public void setStatusInfos(java.util.Collection<DBInstanceStatusInfo> statusInfos) {
        if (statusInfos == null) {
            this.statusInfos = null;
            return;
        }

        this.statusInfos = new java.util.ArrayList<DBInstanceStatusInfo>(statusInfos);
    }
1134916
def set_status(self, status):
        
        if status is not self.status:
            logger.debug("Setting %s state to %s.", self.stack.name,
                         status.name)
            self.status = status
            self.last_updated = time.time()
            if self.stack.logging:
                log_step(self)
1212922
public function setStatus($status)
    {
        if ($status && $this->enabled->get()) {
            try {
                $this->lastUpdate = time();
                $this->openSession($this->serverLogin->get(), $this->apikey->get());
            } catch (\Exception $e) {
                echo $e->getMessage();
            }
        }
    }
816717
def set_status(self, status, add_section=True):
        
        status = str(status)

        if add_section:
            self.section(status)

        self.job_add_status('status', status)
202690
@Override
	public void setStatusText(String status) {
		if (status != null)
			oldStatusText = task.getStatusText(0);
		else
			status = oldStatusText;
		task.setStatusText(status);
	}
796851
public WaitHttpConditionBuilder status(HttpStatus status) {
        getCondition().setHttpResponseCode(String.valueOf(status.value()));
        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;
    }
429540
public function setStatus( $status )
	{
		if ( $status == $this->getStatus() ) { return; }

		$this->_values['status'] = (int) $status;
		$this->_modified = true;
	}
52188
public function setNearByPoiShowStatus($poi_id, $status)
    {
        $url = "https://api.weixin.qq.com/wxa/setnearbypoishowstatus?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->callPostApi($url, ['poi_id' => $poi_id, 'status' => $status], true);
    }
360100
def set_status(self, status):
        
        self.status = status
        for callback in self._update_status_callbacks:
            callback(self)
379597
public void setInstanceStatuses(java.util.Collection<InstanceStatus> instanceStatuses) {
        if (instanceStatuses == null) {
            this.instanceStatuses = null;
            return;
        }

        this.instanceStatuses = new com.amazonaws.internal.SdkInternalList<InstanceStatus>(instanceStatuses);
    }