Examples of addManagedInstance()


Examples of com.metamx.common.lifecycle.Lifecycle.addManagedInstance()

              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
View Full Code Here

Examples of com.metamx.common.lifecycle.Lifecycle.addManagedInstance()

                final ScheduledExecutorFactory executorFactory = ScheduledExecutors.createFactory(leaderLifecycle);
                resourceManagementScheduler = managementSchedulerFactory.build(
                    (RemoteTaskRunner) taskRunner,
                    executorFactory
                );
                leaderLifecycle.addManagedInstance(resourceManagementScheduler);
              }
              leaderLifecycle.addManagedInstance(taskQueue);
              leaderLifecycle.addHandler(
                  new Lifecycle.Handler()
                  {
View Full Code Here

Examples of com.metamx.common.lifecycle.Lifecycle.addManagedInstance()

                    (RemoteTaskRunner) taskRunner,
                    executorFactory
                );
                leaderLifecycle.addManagedInstance(resourceManagementScheduler);
              }
              leaderLifecycle.addManagedInstance(taskQueue);
              leaderLifecycle.addHandler(
                  new Lifecycle.Handler()
                  {
                    @Override
                    public void start() throws Exception
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.