Package com.twitter.common.application

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


  private MesosSchedulerImpl scheduler;

  @Before
  public void setUp() {
    storageUtil = new StorageTestUtil(this);
    final Lifecycle lifecycle =
        new Lifecycle(createMock(Command.class), createMock(UncaughtExceptionHandler.class));
    systemLauncher = createMock(TaskLauncher.class);
    userLauncher = createMock(TaskLauncher.class);
    eventSink = createMock(EventSink.class);
    stateManager = createMock(StateManager.class);
View Full Code Here

        bind(WriterInterface.class).toInstance(logWriter);
        bind(new TypeLiteral<Amount<Long, Time>>() { }).annotatedWith(MesosLog.WriteTimeout.class)
            .toInstance(WRITE_TIMEOUT);
        bind(byte[].class).annotatedWith(MesosLog.NoopEntry.class)
            .toInstance(DUMMY_CONTENT.getBytes(Charsets.UTF_8));
        bind(Lifecycle.class).toInstance(new Lifecycle(shutdownHooks, null));
      }
    });

    MesosLog log = injector.getInstance(MesosLog.class);
    logStream = log.open();
View Full Code Here

        bind(WriterInterface.class).toInstance(logWriter);
        bind(new TypeLiteral<Amount<Long, Time>>() { }).annotatedWith(MesosLog.WriteTimeout.class)
            .toInstance(WRITE_TIMEOUT);
        bind(byte[].class).annotatedWith(MesosLog.NoopEntry.class)
            .toInstance(DUMMY_CONTENT.getBytes(StandardCharsets.UTF_8));
        bind(Lifecycle.class).toInstance(new Lifecycle(shutdownHooks, null));
      }
    });

    MesosLog log = injector.getInstance(MesosLog.class);
    logStream = log.open();
View Full Code Here

    control.replay();

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

  private MesosSchedulerImpl scheduler;

  @Before
  public void setUp() {
    storageUtil = new StorageTestUtil(this);
    final Lifecycle lifecycle =
        new Lifecycle(createMock(Command.class), createMock(UncaughtExceptionHandler.class));
    systemLauncher = createMock(TaskLauncher.class);
    userLauncher = createMock(TaskLauncher.class);
    eventSink = createMock(EventSink.class);

    Injector injector = Guice.createInjector(new AbstractModule() {
View Full Code Here

  @Before
  public void setUp() {
    shutdownCommand = createMock(Command.class);
    handler = new QuitCallback(
        new Lifecycle(shutdownCommand, createMock(UncaughtExceptionHandler.class)));
  }
View Full Code Here

TOP

Related Classes of com.twitter.common.application.Lifecycle

Copyright © 2018 www.massapicom. 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.