Sets the state that will be used on next reset.
194945
def set_initial_state(self, initial_state, initial_frames):
    """"""
    self.env.set_initial_state(initial_state, initial_frames)
    self._initial_frames = initial_frames
216773
def setChecked(self, state):
        
        super(XLockButton, self).setChecked(state)
        self.updateState()
206347
public void reset() {
    checkReadOnly();
    if (state != READY && state != DONE) {
      throw new ResetException();
    }
    state = RESET;
    LIB.mdb_txn_reset(ptr);
  }
495672
@Override
	public void setCurrent(T stateful, State<T> current, State<T> next) throws StaleStateException {
		synchronized(stateful) {
			if (this.getCurrent(stateful).equals(current)) {
				this.setCurrent(stateful, next);
			} else {
				throw new StaleStateException();
			}
		}
	}
98632
def _reset_state_mode(self, state, mode):
        

        state.set_mode(mode)
        state.options |= self._state_add_options
        state.options = state.options.difference(self._state_remove_options)
908753
def reset_state(self):
        
        assert not self._reset_done, "reset_state() was called twice! This violates the API of DataFlow!"
        self._reset_done = True

        # __del__ not guaranteed to get called at exit
        atexit.register(del_weakref, weakref.ref(self))
429063
protected void setUninitialize()
	{
    	if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
    		logger.logp(Level.FINE, CLASS_NAME,"setUninitialized ","" + this.toString());    

		state = UNINITIALIZED_STATE;
	}
1230482
def Reset(self):
    """"""
    # The first state
    self.state = "INITIAL"
    self.state_stack = []

    # The buffer we are parsing now
    self.buffer = ""
    self.error = 0
    self.verbose = 0

    # The index into the buffer where we are currently pointing
    self.processed = 0
    self.processed_buffer = ""
940826
def _set_master_state(self, state):
        """"""
        if state == 'init':
            self._service_state.update_current_state('init', force=True)
            self.set_state(DevState.INIT)

        elif state == 'on':
            self.set_state(DevState.ON)
            self._service_state.update_current_state('on')
512351
protected void setState(int newState) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setState", newState);

        synchronized (stateLock) {
            if ((newState == JmsInternalConstants.CLOSED)
                || (newState == JmsInternalConstants.STOPPED)
                || (newState == JmsInternalConstants.STARTED)) {
                state = newState;
                stateLock.notifyAll();
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setState");
    }
392696
private void setState(IState toState)
    {
        // We want to make sure state changes happen purely on the "home" thread,
        // for the sake of sanity and avoiding many obscure race-condition bugs.
        if (Thread.currentThread() == this.homeThread)
        {
            // We are on the home thread, so safe to proceed:
            if (this.state != toState)
            {
                System.out.println(getName() + " enter state: " + toState);
                TCPUtils.Log(Level.INFO, "======== " + getName() + " enter state: " + toState + " ========");
                this.state = toState;
                onPreStateChange(toState);
                onStateChange();
            }
        }
        else
        {
            // We are not on the home thread; queue this state transition
            // so that the home thread can act on it.
            queueStateChange(toState);
        }
    }
1327702
protected void setState(State state) {
        if (DEBUG)
            LOG.debug("{} --> {}", _state, state);
        _state = state;
    }
23013
def set_state(self, state, *, index=0):
        """"""
        return self.set_values({
            ATTR_DEVICE_STATE: int(state)
        }, index=index)
297265
def set_state(self, newState, timer=0):
        """"""
        if _debug: SSM._debug("set_state %r (%s) timer=%r", newState, SSM.transactionLabels[newState], timer)

        # make sure we have a correct transition
        if (self.state == COMPLETED) or (self.state == ABORTED):
            e = RuntimeError("invalid state transition from %s to %s" % (SSM.transactionLabels[self.state], SSM.transactionLabels[newState]))
            SSM._exception(e)
            raise e

        # stop any current timer
        self.stop_timer()

        # make the change
        self.state = newState

        # if another timer should be started, start it
        if timer:
            self.start_timer(timer)
637859
private function reset_state()
        {
            $this->state['helo'] = false;
            $this->state['mail'] = false;
            $this->state['rcpt'] = false;
        }
1317801
private synchronized void setState(int state) {
        mState = state;

        // Give the new state to the Handler so the UI Activity can update
        mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
                .sendToTarget();
    }
1320653
public void setState(S state){
		Integer id = definition.getStateId(state);
		currentStateId.set(id);
	}