Examples of Lifecycle


Examples of chapter3.section2.LifeCycle

        Fill fi = new Fill(inputs.eClearSale.map(u -> Unit.UNIT),
                           inputs.eFuelPulses, inputs.calibration,
                           inputs.price1, inputs.price2, inputs.price3,
                           eStart);
        NotifyPointOfSale np = new NotifyPointOfSale(
                new LifeCycle(inputs.eNozzle1,
                              inputs.eNozzle2,
                              inputs.eNozzle3),
                inputs.eClearSale,
                fi);
        eStart.loop(np.eStart);
View Full Code Here

Examples of com.caucho.lifecycle.Lifecycle

      try {
        thread.setContextClassLoader(getClassLoader());

        _serverIdLocal.set(_selfServer.getId());
       
        _lifecycle = new Lifecycle(log, toString(), Level.INFO);
       
        preInit();
      } finally {
        thread.setContextClassLoader(oldLoader);
      }
View Full Code Here

Examples of com.caucho.lifecycle.Lifecycle

      _webappsPath = entAppRoot.lookup("webapps");
      WorkDir.setLocalWorkDir(entAppRoot.lookup("META-INF/work"),
                              _loader);
    }

    _lifecycle = new Lifecycle(log, toString(), Level.INFO);

    if (_controller != null && _controller.getArchivePath() != null)
      Environment.addDependency(new Depend(_controller.getArchivePath()), _loader);

    _localEApp.set(this, _loader);
View Full Code Here

Examples of com.caucho.lifecycle.Lifecycle

  {
    _persistenceManager = manager;
   
    _name = name;
   
    _lifecycle = new Lifecycle(log, "PersistenceUnit[" + name + "]");
   
    _entityManagerFactoryProxy = new EntityManagerFactoryProxy(this);

    _transactionType = transactionType;
View Full Code Here

Examples of com.elevenware.redcorn.lifecycle.Lifecycle

        List<BeanDefinition> dependencyChain = ordering.sort();
        Visitors.constructorArgsInstantiator(this).visitAll(dependencyChain);

        for(BeanDefinition definition: context.values()) {
            if(Lifecycle.class.isAssignableFrom(definition.getType())) {
                Lifecycle lifecycle = (Lifecycle) definition.getPayload();
                lifecycle.start();
            }
            if(ContainerAware.class.isAssignableFrom(definition.getType())) {
                ((ContainerAware) definition.getPayload()).setContainer(this);
            }
        }
View Full Code Here

Examples of com.metamx.common.lifecycle.Lifecycle

                  taskLockbox,
                  emitter
              );

              // Sensible order to start stuff:
              final Lifecycle leaderLifecycle = new Lifecycle();
              if (leaderLifecycleRef.getAndSet(leaderLifecycle) != null) {
                log.makeAlert("TaskMaster set a new Lifecycle without the old one being cleared!  Race condition")
                   .emit();
              }
              leaderLifecycle.addManagedInstance(taskRunner);
              if (taskRunner instanceof RemoteTaskRunner) {
                final ScheduledExecutorFactory executorFactory = ScheduledExecutors.createFactory(leaderLifecycle);
                resourceManagementScheduler = managementSchedulerFactory.build(
                    (RemoteTaskRunner) taskRunner,
                    executorFactory
                );
                leaderLifecycle.addManagedInstance(resourceManagementScheduler);
              }
              leaderLifecycle.addManagedInstance(taskQueue);
              leaderLifecycle.addHandler(
                  new Lifecycle.Handler()
                  {
                    @Override
                    public void start() throws Exception
                    {
                      serviceAnnouncer.announce(node);
                    }

                    @Override
                    public void stop()
                    {
                      serviceAnnouncer.unannounce(node);
                    }
                  }
              );
              try {
                leaderLifecycle.start();
                leading = true;
                while (leading && !Thread.currentThread().isInterrupted()) {
                  mayBeStopped.await();
                }
              }
View Full Code Here

Examples of com.sun.jini.start.LifeCycle

                "http://resendes:8080/mercury.jar",
                "com.sun.jini.mercury.TransientMercuryBogusImpl",
                new String[] {
        "http://resendes:8089/mercury_service_trans.config"
    });
        LifeCycle DefaultLifeCycle = nasdWithoutExtras.getLifeCycle();
        ProxyPreparer DefaultPreparer = nasdWithoutExtras.getServicePreparer();
       
  String sharedVmLog = "/tmp/sharedvm.log";
        String[] sharedvm_props = new String[] {// server properties
        "com.sun.jini.start.activatewrapper.debug", "init",
View Full Code Here

Examples of com.twitter.common.application.Lifecycle

    control.replay();

    schedulerLifecycle = new SchedulerLifecycle(
        driverFactory,
        storageUtil.storage,
        new Lifecycle(shutdownRegistry, new UncaughtExceptionHandler() {
          @Override
          public void uncaughtException(Thread t, Throwable e) {
            fail(e.getMessage());
          }
        }),
View Full Code Here

Examples of hudson.lifecycle.Lifecycle

    /**
     * Performs a restart.
     */
    public void restart() throws RestartNotSupportedException {
        final Lifecycle lifecycle = Lifecycle.get();
        lifecycle.verifyRestartable(); // verify that Hudson is restartable
        servletContext.setAttribute("app", new HudsonIsRestarting());

        new Thread("restart thread") {
            final String exitUser = getAuthentication().getName();
            @Override
            public void run() {
                try {
                    ACL.impersonate(ACL.SYSTEM);

                    // give some time for the browser to load the "reloading" page
                    Thread.sleep(5000);
                    LOGGER.severe(String.format("Restarting VM as requested by %s",exitUser));
                    for (RestartListener listener : RestartListener.all())
                        listener.onRestart();
                    lifecycle.restart();
                } catch (InterruptedException e) {
                    LOGGER.log(Level.WARNING, "Failed to restart Hudson",e);
                } catch (IOException e) {
                    LOGGER.log(Level.WARNING, "Failed to restart Hudson",e);
                }
View Full Code Here

Examples of jade.core.LifeCycle

         
          dest.handleTransferResult(agentID, transferResult, messages);
         
          try {
            // Cause the termination of the agent thread
            a.changeStateTo(new LifeCycle(AP_GONE) {
              public boolean alive() {
                return false;
              }
            });
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.