Resets the state log.

@return The server context.
16370
ServerContext reset() {
    // Delete the existing log.
    if (log != null) {
      log.close();
      storage.deleteLog(name);
    }

    // Delete the existing snapshot store.
    if (snapshot != null) {
      snapshot.close();
      storage.deleteSnapshotStore(name);
    }

    // Open the log.
    log = storage.openLog(name);

    // Open the snapshot store.
    snapshot = storage.openSnapshotStore(name);

    // Create a new user state machine.
    StateMachine stateMachine = stateMachineFactory.get();

    // Configure the log compaction mode. If the state machine supports snapshotting, the default
    // compaction mode is SNAPSHOT, otherwise the default is SEQUENTIAL.
    if (stateMachine instanceof Snapshottable) {
      log.compactor().withDefaultCompactionMode(Compaction.Mode.SNAPSHOT);
    } else {
      log.compactor().withDefaultCompactionMode(Compaction.Mode.SEQUENTIAL);
    }

    // Create a new internal server state machine.
    this.stateMachine = new ServerStateMachine(stateMachine, this, stateContext);
    return this;
  }
1249026
def reset():
        """"""
        Logger.journal = []
        Logger.fatal_warnings = False
        Logger._ignored_codes = set()
        Logger._ignored_domains = set()
        Logger._verbosity = 2
        Logger._last_checkpoint = 0
1312056
public static void resetMarksInLogs(LibertyServer server) throws Exception {
        server.setMarkToEndOfLog(server.getDefaultLogFile());
        server.setMarkToEndOfLog(server.getMostRecentTraceFile());
    }
863676
protected function resetState()
    {
        $this->iteratedCount = 0;
        $this->retrievedCount = 0;
        $this->nextToken = false;
        $this->resources = null;
        $this->invalid = false;
    }
597806
public java.lang.String getOnreset() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.onreset);

    }
1020273
private void resetLoggedInOutIndicators() {
		getLoggedInIndicaterRegexField().setToolTipText(null);
		getLoggedInIndicaterRegexField().setEnabled(true);
		getLoggedOutIndicaterRegexField().setToolTipText(null);
		getLoggedOutIndicaterRegexField().setEnabled(true);
	}
880452
public ThreadDelegatedContext getContext()
    {
        ThreadDelegatedContext context = threadLocal.get();
        if (context == null) {
            context = new ThreadDelegatedContext();
            threadLocal.set(context);
        }
        return context;
    }
929151
static synchronized void clearLogContext() {
        final LogContext embeddedLogContext = Holder.LOG_CONTEXT;
        // Remove the configurator and clear the log context
        final Configurator configurator = embeddedLogContext.getLogger("").detach(Configurator.ATTACHMENT_KEY);
        // If this was a PropertyConfigurator we can use the LogContextConfiguration API to tear down the LogContext
        if (configurator instanceof PropertyConfigurator) {
            final LogContextConfiguration logContextConfiguration = ((PropertyConfigurator) configurator).getLogContextConfiguration();
            clearLogContext(logContextConfiguration);
        } else if (configurator instanceof LogContextConfiguration) {
            clearLogContext((LogContextConfiguration) configurator);
        } else {
            // Remove all the handlers and close them as well as reset the loggers
            final List<String> loggerNames = Collections.list(embeddedLogContext.getLoggerNames());
            for (String name : loggerNames) {
                final Logger logger = embeddedLogContext.getLoggerIfExists(name);
                if (logger != null) {
                    final Handler[] handlers = logger.clearHandlers();
                    if (handlers != null) {
                        for (Handler handler : handlers) {
                            handler.close();
                        }
                    }
                    logger.setFilter(null);
                    logger.setUseParentFilters(false);
                    logger.setUseParentHandlers(true);
                    logger.setLevel(Level.INFO);
                }
            }
        }
    }
350886
public void reset() {
    this.state = State.FREE;
    this.level = Integer.MAX_VALUE;
    this.mark = 0;
    this.reason = null;
  }
528948
public synchronized static void resetLoggingToDefaultState() {
        final SplitlogLoggingState previousState = SplitlogLoggerFactory.state;
        if (previousState == SplitlogLoggingState.DEFAULT) {
            // nothing to change
            return;
        }
        /*
         * intentionally using the original logger so that this message can not
         * be silenced
         */
        LoggerFactory.getLogger(SplitlogLoggerFactory.class).info(
                "Splitlog's internal logging reset back to property-driven.");
        SplitlogLoggerFactory.state = SplitlogLoggingState.DEFAULT;
        SplitlogLoggerFactory.messageCounter.set(0);
    }
744211
public void reset()
  {

    if (!m_hasBeenReset && m_shouldReset)
    {
      m_hasBeenReset = true;

      if (this.m_outputStream != null)
      {
        try
        {
          m_outputStream.close();
        }
        catch (java.io.IOException ioe){}
      }

      m_outputStream = null;

      // I need to look more carefully at which of these really
      // needs to be reset.
      m_countersTable = null;

      m_xcontext.reset();
      
      m_xcontext.getVarStack().reset();
      resetUserParameters();
      

      m_currentTemplateElements.removeAllElements();     
      m_currentMatchTemplates.removeAllElements();
      m_currentMatchedNodes.removeAllElements();
      
      m_serializationHandler = null;      
      m_outputTarget = null;
      m_keyManager = new KeyManager();
      m_attrSetStack = null;
      m_countersTable = null;
      m_currentTemplateRuleIsNull = new BoolStack();
      // m_xmlSource = null; // android-removed
      m_doc = DTM.NULL;
      // m_isTransformDone = false; // android-removed
      m_transformThread = null;

      // m_inputContentHandler = null;
      // For now, reset the document cache each time.
      m_xcontext.getSourceTreeManager().reset();
    }

    //    m_reportInPostExceptionFromThread = false;
  }
38125
public function reset()
    {
        $this->controllerResolver->reset();
        $this->repositoryResolver->reset();
        $this->viewResolver->reset();

        return $this;
    }
1016766
public String getAndReset() {
		synchronized (buffer) {
			String res = new String(this.buffer.toByteArray(), getCharacterSet());
			this.buffer.reset();
			return res;
		}
	}
542157
public function reset()
    {
        $this->contentLength = 0;
        $this->data = "";
        $this->headers = [];
        $this->status = 200;

        return $this;
    }
985799
public static Log instance(Context context) {
        Log instance = context.get(logKey);
        if (instance == null)
            instance = new Log(context);
        return instance;
    }
898502
public function reset()
    {
        $this->close();
        $this->_cookies = array();
        $this->_headers = array();
        $this->error = false;
        $this->error_code = 0;
        $this->error_message = null;
        $this->curl_error = false;
        $this->curl_error_code = 0;
        $this->curl_error_message = null;
        $this->http_error = false;
        $this->http_status_code = 0;
        $this->http_error_message = null;
        $this->request_headers = null;
        $this->response_headers = array();
        $this->response = false;
        $this->init();
        return $this;
    }
734783
public void resetThreadContextLoader() {
        if (LoaderUtils.isContextLoaderAvailable() && isContextLoaderSaved) {
            LoaderUtils.setContextClassLoader(savedContextLoader);
            savedContextLoader = null;
            isContextLoaderSaved = false;
        }
    }