Examples of ShutdownRegistryImpl


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

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

    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

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

  }

  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

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);
  }
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.