Defines the initial state of the state machine.

@param stateClass
@throws InitializationException
977852
@Override
    public void init(final Class<? extends State> stateClass) throws InitializationException {
        try {
            currentState = getState(stateClass);
            change.firePropertyChange(STATE_CHANGE, null, currentState.getClass());
        } catch (NotAvailableException ex) {
            throw new InitializationException(this, ex);
        }
    }
636971
public void setErrorClass(java.lang.String errorClass) {
        getStateHelper().put(PropertyKeys.errorClass, errorClass);
    }
275833
public void initialize(final JsMessagingEngine engine) {

        final String methodName = "initialize";
        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, engine);
        }

        final Set listeners;

        _messagingEngine = engine;

        synchronized (MESSAGING_ENGINES) {

            // Do we already have a set of initialized MEs on this bus?
            Set messagingEngines = (Set) MESSAGING_ENGINES.get(engine
                    .getBusName());

            // If not, create a new set and add it to the map
            if (messagingEngines == null) {

                messagingEngines = new HashSet();
                MESSAGING_ENGINES.put(engine.getBusName(), messagingEngines);

            }

            // Add the initializing ME to the set
            messagingEngines.add(engine);

            // Get listeners to notify
            listeners = getListeners(_messagingEngine.getBusName());

        }

        // Notify listeners
        for (final Iterator iterator = listeners.iterator(); iterator.hasNext();) {

            final SibRaMessagingEngineListener listener = (SibRaMessagingEngineListener) iterator
                    .next();
            listener.messagingEngineInitializing(_messagingEngine);

        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
1119893
public void setOutputKeyClass(Class<?> theClass
                                ) throws IllegalStateException {
    ensureState(JobState.DEFINE);
    conf.setOutputKeyClass(theClass);
  }
1058287
public void start() throws Exception {
    // 1. Do prepare work
    // create an instance of state manager
    String statemgrClass = Context.stateManagerClass(config);
    LOG.info("Context.stateManagerClass " + statemgrClass);
    IStateManager statemgr;
    try {
      statemgr = ReflectionUtils.newInstance(statemgrClass);
    } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {
      throw new Exception(String.format(
          "Failed to instantiate state manager class '%s'",
          statemgrClass), e);
    }

    // Put it in a try block so that we can always clean resources
    try {
      // initialize the statemgr
      statemgr.initialize(config);

      Boolean b = statemgr.setMetricsCacheLocation(metricsCacheLocation, topologyName)
          .get(5000, TimeUnit.MILLISECONDS);
      if (b != null && b) {
        LOG.info("metricsCacheLocation " + metricsCacheLocation.toString());
        LOG.info("topologyName " + topologyName.toString());

        LOG.info("Starting Metrics Cache HTTP Server");
        metricsCacheManagerHttpServer.start();

        // 2. The MetricsCacheServer would run in the main thread
        // We do it in the final step since it would await the main thread
        LOG.info("Starting Metrics Cache Server");
        metricsCacheManagerServer.start();
        metricsCacheManagerServerLoop.loop();
      } else {
        throw new RuntimeException("Failed to set metricscahe location.");
      }
    } finally {
      // 3. Do post work basing on the result
      // Currently nothing to do here

      // 4. Close the resources
      SysUtils.closeIgnoringExceptions(statemgr);
    }


  }
135326
public static void initialize(final Class<?> _class)
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(Status.UUIDCACHE4GRP)) {
            InfinispanCache.get().<UUID, Status>getCache(Status.UUIDCACHE4GRP).clear();
        } else {
            InfinispanCache.get().<UUID, Status>getCache(Status.UUIDCACHE4GRP)
                            .addListener(new CacheLogListener(Status.LOG));
        }
        if (InfinispanCache.get().exists(Status.IDCACHE4STATUS)) {
            InfinispanCache.get().<Long, Status>getCache(Status.IDCACHE4STATUS).clear();
        } else {
            InfinispanCache.get().<Long, Status>getCache(Status.IDCACHE4STATUS)
                            .addListener(new CacheLogListener(Status.LOG));
        }
        if (InfinispanCache.get().exists(Status.NAMECACHE4GRP)) {
            InfinispanCache.get().<String, StatusGroup>getCache(Status.NAMECACHE4GRP).clear();
        } else {
            InfinispanCache.get().<String, StatusGroup>getCache(Status.NAMECACHE4GRP)
                            .addListener(new CacheLogListener(Status.LOG));
        }
    }
1116621
public void init() {
        if (incNestingCount() > 1) {
            return;
        }
        SessionFactory sf = getSessionFactory();
        if (sf == null) {
            return;
        }
        if (TransactionSynchronizationManager.hasResource(sf)) {
            // Do not modify the Session: just set the participate flag.
            setParticipate(true);
        }
        else {
            setParticipate(false);
            LOG.debug("Opening single Hibernate session in HibernatePersistenceContextInterceptor");
            Session session = getSession();
            HibernateRuntimeUtils.enableDynamicFilterEnablerIfPresent(sf, session);
            TransactionSynchronizationManager.bindResource(sf, new SessionHolder(session));
        }
    }
469251
public final void intialize() throws IllegalStateException {
        synchronized (this) {
            if (tracker != null) {
                throw new IllegalStateException(
                    "DelegatingClassResolver [" + this + "] had been initialized.");
            }
            tracker = new ClassResolverTracker(context, applicationName);
            tracker.open();
        }
    }
365106
public void markInitialState() {

        if (!attachedObjects.isEmpty()) {
            for (T t : attachedObjects) {
                if (t instanceof PartialStateHolder) {
                    ((PartialStateHolder) t).markInitialState();
                }
            }
        }
        initialState = true;

    }
872073
function Machine(initialState, transitions, stateActions) {
    Pusher.EventsDispatcher.call(this);

    this.state = undefined;
    this.errors = [];

    // functions for each state
    this.stateActions = stateActions;

    // set up the transitions
    this.transitions = transitions;

    this.transition(initialState);
  }
245245
protected void initializeState(TTTState<I, D> state) {
        for (int i = 0; i < alphabet.size(); i++) {
            I sym = alphabet.getSymbol(i);
            TTTTransition<I, D> trans = createTransition(state, sym);
            trans.setNonTreeTarget(dtree.getRoot());
            state.setTransition(i, trans);
            openTransitions.insertIncoming(trans);
        }
    }
396444
private void prepareInitialState(boolean isNewObject)
    {
        // determine appropriate modification state
        ModificationState initialState;
        if(isNewObject)
        {
            // if object is not already persistent it must be marked as new
            // it must be marked as dirty because it must be stored even if it will not modified during tx
            initialState = StateNewDirty.getInstance();
        }
        else if(isDeleted(oid))
        {
            // if object is already persistent it will be marked as old.
            // it is marked as dirty as it has been deleted during tx and now it is inserted again,
            // possibly with new field values.
            initialState = StateOldDirty.getInstance();
        }
        else
        {
            // if object is already persistent it will be marked as old.
            // it is marked as clean as it has not been modified during tx already
            initialState = StateOldClean.getInstance();
        }
        // remember it:
        modificationState = initialState;
    }
1277028
public static void initialize() {
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
            @Override
            public Void run() {
                System.setProperty("java.naming.factory.initial", SingletonInitialContextFactory.class.getName());
                return null;
            }
        });

    }
564085
public void initialize() {

        if (m_taskFuture != null) {
            // in case initialize has been called before on this object, cancel the existing task
            m_taskFuture.cancel(false);
            m_taskFuture = null;
        }
        m_state = readCompleteConfiguration();
        // In debug mode, use a shorter delay to speed up the test cases
        long delay = DEBUG ? 500 : TASK_DELAY_MILLIS;
        m_taskFuture = OpenCms.getExecutor().scheduleWithFixedDelay(new Runnable() {

            public void run() {

                performUpdate();
            }
        }, delay, delay, TimeUnit.MILLISECONDS);
    }
840490
@Override
    public void initialize(JsMessagingEngine engine) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "initialize", engine);

        // Get the admin factory class
        try {
            jsaf = JsAdminFactory.getInstance();
        } catch (Exception e) {
            // No FFDC code needed
        }

        // Synchronize on stateChangeLock to manage the startup of the engine with
        // potential addition of new engine components via dynamic config.
//        processor = _mainImpl.mpService.getService().getInstance();
        ListIterator<ComponentList> li = null;
        boolean initializationFailed = false;

        synchronized (stateChangeLock) {

            setState(STATE_INITIALIZING);
            for (int i = 0; i < NUM_STOP_PHASES; i++)
            {
                stopSequence[i] = new Vector<ComponentList>();
            }
            try
            {
                _messageStore = JsMainAdminComponentImpl.messageStoreRef.getService();

            } catch (Exception e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }

            _messageProcessor = loadClass(JsConstants.SIB_CLASS_MP, STOP_PHASE_1, true);

            // Initialize any engine components
            initializationFailed = false;

        } // synchronized(stateChangeLock)
        try {
            //Initialize the message store 
            _messageStore.initialize(this);
            //Initialize the message processor 
            _messageProcessor.initialize(this);
            setState(STATE_INITIALIZED);
        } catch (Exception e) {
            com.ibm.ws.ffdc.FFDCFilter.processException(e, CLASS_NAME + ".<init>", "625", this);
            SibTr.error(tc, "ME_CANNOT_BE_INITIALIZED_SIAS0033", new Object[] { _name, "MessageProcessor.java", "initialize()" });
            SibTr.exception(tc, e);
            initializationFailed = true;

        }
        if (initializationFailed) {
            destroy();
            // Cleanup finished...
            // Change state to UNINITIALIZED
            setState(STATE_UNINITIALIZED);
        } else {
            setState(STATE_INITIALIZED);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "initialize");
    }
492751
@Override
    public void init() throws InitializationException {
        engine = Engine.createCachingEngine();
        JMTEDateRendrer dateRendrer = new JMTEDateRendrer();
        dateRendrer.setDateFormat(dateFormat);
        engine.registerRenderer(Date.class, dateRendrer);
    }
1021751
public void initialize(final S state) {
        final FastMealyState<O> init = this.observationTree.addInitialState();
        this.nodeToObservationMap.put(state, init);
    }