Examples of startAsync()


Examples of org.apache.helix.HelixController.startAsync()

    ClusterId clusterId = ClusterId.from(clusterName);
    final ControllerId controllerId = ControllerId.from("controller");

    // start controller
    HelixController controller = connection.createController(clusterId, controllerId);
    controller.startAsync();

    // check live-instance znode for localhost_12918 exists
    final HelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_gZkClient));
    final PropertyKey.Builder keyBuilder = accessor.keyBuilder();
View Full Code Here

Examples of org.apache.helix.HelixParticipant.startAsync()

    // start the specified participant
    HelixParticipant helixParticipant =
        connection.createParticipant(clusterId, participant.getId());
    helixParticipant.getStateMachineEngine().registerStateModelFactory(
        lockUnlock.getStateModelDefId(), new LockUnlockFactory());
    helixParticipant.startAsync();

    // start another participant via auto join
    HelixParticipant autoJoinParticipant =
        connection.createParticipant(clusterId, ParticipantId.from("localhost_12120"));
    autoJoinParticipant.getStateMachineEngine().registerStateModelFactory(
View Full Code Here

Examples of org.apache.helix.HelixParticipant.startAsync()

    // start another participant via auto join
    HelixParticipant autoJoinParticipant =
        connection.createParticipant(clusterId, ParticipantId.from("localhost_12120"));
    autoJoinParticipant.getStateMachineEngine().registerStateModelFactory(
        lockUnlock.getStateModelDefId(), new LockUnlockFactory());
    autoJoinParticipant.startAsync();

    Thread.sleep(5000);
    printExternalView(connection, clusterId, resource.getId());

    // stop the participants
View Full Code Here

Examples of org.apache.helix.HelixParticipant.startAsync()

    // start participant
    HelixParticipant participant = connection.createParticipant(clusterId, participantId);
    participant.getStateMachineEngine().registerStateModelFactory(
        StateModelDefId.from("MasterSlave"), new MockStateModelFactory());

    participant.startAsync();

    // verify
    final HelixDataAccessor accessor = connection.createDataAccessor(clusterId);
    final PropertyKey.Builder keyBuilder = accessor.keyBuilder();
    boolean success = TestHelper.verify(new TestHelper.Verifier() {
View Full Code Here

Examples of org.apache.helix.participant.AbstractParticipantService.startAsync()

      Class<? extends AbstractParticipantService> clazz =
          (Class<? extends AbstractParticipantService>) Class.forName(participantClass);
      final AbstractParticipantService containerParticipant =
          clazz.getConstructor(HelixConnection.class, ClusterId.class, ParticipantId.class)
              .newInstance(connection, clusterId, participantId);
      containerParticipant.startAsync();
      containerParticipant.awaitRunning(60, TimeUnit.SECONDS);
      containerParticipant
          .getParticipant()
          .getMessagingService()
          .registerMessageHandlerFactory(MessageType.SHUTDOWN.toString(),
View Full Code Here

Examples of org.eclipse.jetty.server.Request.startAsync()

                boolean wrapped = false;
                final AsyncContext asyncContext;
                if (request.getParameter("dispatchRequestResponse") != null)
                {
                    wrapped = true;
                    asyncContext = request.startAsync(request, new Wrapper(response));
                    __asyncContext=asyncContext;
                }
                else
                {
                    asyncContext = request.startAsync();
View Full Code Here

Examples of org.eclipse.jetty.server.Request.startAsync()

                    asyncContext = request.startAsync(request, new Wrapper(response));
                    __asyncContext=asyncContext;
                }
                else
                {
                    asyncContext = request.startAsync();
                    __asyncContext=asyncContext;
                }

                new Thread(new DispatchingRunnable(asyncContext, wrapped)).start();
            }
View Full Code Here

Examples of org.jboss.as.web.deployment.WebDeploymentService.ContextActivator.startAsync()

            brev.addAttachment(ContextActivator.class, activator);

            // Start the context when the bundle will get started automatically
            Deployment deployment = bundle.adapt(Deployment.class);
            if (deployment.isAutoStart()) {
                activator.startAsync();
            }
        }
    }

    @Override
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace.startAsync()

      manager.install(one_dep).perform();

      ConfigurationScanListener listener = new ConfigurationScanListener();
      ListenerRegistration<ContainerLifecycleListener> registration = furnace.addContainerLifecycleListener(listener);

      furnace.startAsync();

      while (!listener.isConfigurationScanned())
         Thread.sleep(100);

      registration.removeListener();
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace.startAsync()

      String[] args = new String[] { "arg1", "arg2" };

      Furnace forge = FurnaceFactory.getInstance();
      forge.setArgs(args);
      forge.addRepository(AddonRepositoryMode.MUTABLE, repodir1);
      forge.startAsync();

      String[] forgeArgs = forge.getArgs();
      Assert.assertArrayEquals(args, forgeArgs);

      forge.stop();
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.