Examples of state()


Examples of net.emaze.dysfunctional.dispatching.logic.Proposition.state()

    @Test
    public void callingIncrementsTheAtomicLong() {
        final AtomicLong state = new AtomicLong();
        final Proposition spy = new MonitoringProposition(new Yes(), state);
        spy.state();
        Assert.assertEquals(1l, state.get());
    }
}
View Full Code Here

Examples of org.activiti.spring.annotations.State.state()

            if (StringUtils.hasText(state.process())) {
              processName = state.process();
            }

            String stateName = state.state();

            if (!StringUtils.hasText(stateName)) {
              stateName = state.value();
            }
View Full Code Here

Examples of org.apache.twill.api.TwillController.state()

      TwillController controller = getController(zkClientService, runId);
      controller.sendCommand(Command.Builder.of("test").build()).get(2, TimeUnit.SECONDS);
      controller.stop().get(2, TimeUnit.SECONDS);

      Assert.assertEquals(ServiceController.State.TERMINATED, controller.state());

      final CountDownLatch terminateLatch = new CountDownLatch(1);
      service.addListener(new ServiceListenerAdapter() {
        @Override
        public void terminated(Service.State from) {
View Full Code Here

Examples of org.bitbucket.bradleysmithllc.java_cl_parser.support.ArgTool.state()

  @Test
  public void argSupplied() throws Throwable
  {
    ArgTool basicTest = new ArgTool(true, true, true);
    CommonsCLILauncher.mainWithInstance(basicTest, new String[]{"-tc", "-flag1", "-flag2"});
    Assert.assertTrue("Flags don't match expected state: " + basicTest.state(), basicTest.isSet());
  }

  @Test
  public void argNotSupplied() throws Throwable
  {
View Full Code Here

Examples of org.camunda.bpm.engine.spring.annotations.State.state()

            if (StringUtils.hasText(state.process())) {
              processName = state.process();
            }

            String stateName = state.state();

            if (!StringUtils.hasText(stateName)) {
              stateName = state.value();
            }
View Full Code Here

Examples of org.eclipse.sapphire.ui.SapphireEditorPagePart.state()

                if( page == null )
                {
                    throw new FunctionException( editorPageNotFound.text() );
                }
               
                return page.state();
            }
        };
    }
   
}
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.MasterDetailsEditorPagePart.state()

                final Element element = part.getLocalModelElement();
               
                if( element instanceof Item )
                {
                    final Item item = (Item) element;
                    final MasterDetailsEditorPageState state = page.state();
   
                    return new FunctionResult( this, context )
                    {
                        private Listener listener;
                       
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.state.ClusterStateResponse.state()

        PutMappingResponse putMappingResponse = client("server1").admin().indices().preparePutMapping("test").setType("type1").setSource(mappingSource()).execute().actionGet();
        assertThat(putMappingResponse.acknowledged(), equalTo(true));

        // verify that mapping is there
        ClusterStateResponse clusterState = client("server1").admin().cluster().state(clusterStateRequest()).actionGet();
        assertThat(clusterState.state().metaData().index("test").mapping("type1"), notNullValue());

        // create two and delete the first
        logger.info("Indexing #1");
        client("server1").index(Requests.indexRequest("test").type("type1").id("1").source(source("1", "test"))).actionGet();
        logger.info("Indexing #2");
View Full Code Here

Examples of org.elasticsearch.client.ClusterAdminClient.state()

        public void run() {
            boolean reschedule = true;
            try {
                ClusterAdminClient clusterAdminClient = adminClient.cluster();

                ClusterStateResponse state = clusterAdminClient.state(clusterAdminClient.prepareState().request()).actionGet();

                if (!state.getState().nodes().getLocalNode().isMasterNode()) {
                    return;
                }
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterService.state()

        // sleep till the cluster state gets published, since we check the master
        Thread.sleep(200);


        ClusterState clusterState1 = clusterService1.state();
        RoutingNode routingNodeEntry1 = clusterState1.readOnlyRoutingNodes().nodesToShards().get(clusterState1.nodes().localNodeId());
        assertThat(routingNodeEntry1.numberOfShardsWithState(STARTED), equalTo(11));

        clusterState1 = client("server1").admin().cluster().state(clusterStateRequest()).actionGet().state();
        routingNodeEntry1 = clusterState1.readOnlyRoutingNodes().nodesToShards().get(clusterState1.nodes().localNodeId());
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.