Package com.twitter.common.application.ShutdownRegistry

Examples of com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl


      }
    };

    Set<ServiceRunner> services = ImmutableSet.of(fakeRunner);
    LocalServiceRegistry serviceRegistry =
        new LocalServiceRegistry(Providers.of(services), new ShutdownRegistryImpl());
    leaderRedirector = new LeaderRedirect(serviceRegistry, schedulers);

    monitorCapture = new Capture<>();
    expect(schedulers.watch(capture(monitorCapture))).andReturn(null);
    control.replay();
View Full Code Here


    schedulerWatcher = createCapture();
    expect(schedulers.watch(capture(schedulerWatcher))).andReturn(createMock(Command.class));

    control.replay();

    final ShutdownRegistryImpl shutdownRegistry = injector.getInstance(ShutdownRegistryImpl.class);
    addTearDown(new TearDown() {
      @Override
      public void tearDown() {
        shutdownRegistry.execute();
      }
    });
    injector.getInstance(StartupRegistry.class).execute();
    LocalServiceRegistry serviceRegistry = injector.getInstance(LocalServiceRegistry.class);
    httpServer = serviceRegistry.getAuxiliarySockets().get("http");
View Full Code Here

  }

  protected void replayAndStart() {
    control.replay();

    final ShutdownRegistryImpl shutdownRegistry = injector.getInstance(ShutdownRegistryImpl.class);
    addTearDown(new TearDown() {
      @Override
      public void tearDown() {
        shutdownRegistry.execute();
      }
    });
    try {
      injector.getInstance(StartupRegistry.class).execute();
    } catch (Exception e) {
View Full Code Here

      }
    };

    Set<ServiceRunner> services = ImmutableSet.of(fakeRunner);
    LocalServiceRegistry serviceRegistry =
        new LocalServiceRegistry(Providers.of(services), new ShutdownRegistryImpl());
    leaderRedirector = new LeaderRedirect(serviceRegistry, schedulers);

    monitorCapture = new Capture<>();
    expect(schedulers.watch(capture(monitorCapture))).andReturn(null);
  }
View Full Code Here

TOP

Related Classes of com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl

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.