Examples of shutdown()


Examples of org.apache.zookeeper.server.ZooKeeperServer.shutdown()

        PrepRequestProcessor processor = new PrepRequestProcessor(zks, new MyRequestProcessor());
        Request foo = new Request(null, 1l, 1, OpCode.create, ByteBuffer.allocate(3), null);
        processor.pRequest(foo);
        testEnd.await(5, java.util.concurrent.TimeUnit.SECONDS);
        f.shutdown();
        zks.shutdown();
    }

    private class MyRequestProcessor implements RequestProcessor {
        @Override
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.Election.shutdown()

            LOG.info("Shutting down quorum peer " + qp.getName());
            qp.shutdown();
            Election e = qp.getElectionAlg();
            if (e != null) {
                LOG.info("Shutting down leader election " + qp.getName());
                e.shutdown();
            } else {
                LOG.info("No election available to shutdown " + qp.getName());
            }
            LOG.info("Waiting for " + qp.getName() + " to exit thread");
            qp.join(30000);
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.FastLeaderElection.shutdown()

                        LOG.info("I'm the leader: " + i);
                        if (lc < this.totalRounds) {
                            LOG.info("Leader " + i + " dying");
                            FastLeaderElection election =
                                (FastLeaderElection) peer.getElectionAlg();
                            election.shutdown();
                            // Make sure the vote is reset to -1 after shutdown.
                            Assert.assertEquals(-1, election.getVote().getId());
                            LOG.info("Leader " + i + " dead");
                           
                            break;
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.Leader.shutdown()

              Assert.fail("leader timed out in getEpochToPropose");
            }
        } finally {
            recursiveDelete(tmpDir);
            if (leader != null) {
                leader.shutdown("end of test");
            }
        }
    }
   
    /**
 
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeer.shutdown()

    public void shutdown(int id) {
        QuorumPeer qp = getPeer(id).peer;
        try {
            LOG.info("Shutting down quorum peer " + qp.getName());
            qp.shutdown();
            Election e = qp.getElectionAlg();
            if (e != null) {
                LOG.info("Shutting down leader election " + qp.getName());
                e.shutdown();
            } else {
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerTestBase.MainThread.shutdown()

                CreateMode.PERSISTENT);
        assertEquals(new String(zk.getData("/foo_q2", null, null)), "foobar2");
        zk.close();

        q1.shutdown();
        q2.shutdown();

        assertTrue("waiting for server 1 down",
                ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP1,
                        ClientBase.CONNECTION_TIMEOUT));
        assertTrue("waiting for server 2 down",
View Full Code Here

Examples of org.asteriskjava.live.DefaultAsteriskServer.shutdown()

        {
            @Override
            public void run()
            {
                tracer.write();
                server.shutdown();
            }
        }
        );

        while(true)
View Full Code Here

Examples of org.camunda.bpm.engine.impl.jobexecutor.JobExecutor.shutdown()

  private void moveByHours(int hours) throws Exception {
    ClockUtil.setCurrentTime(new Date(ClockUtil.getCurrentTime().getTime() + ((hours * 60 * 1000 * 60) + 5000)));
    JobExecutor jobExecutor = processEngineConfiguration.getJobExecutor();
    jobExecutor.start();
    Thread.sleep(1000);
    jobExecutor.shutdown();
  }

  @Deployment
  public void testMultipleOutgoingSequenceFlows() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("nonInterruptingTimer");
View Full Code Here

Examples of org.castor.cache.CacheFactory.shutdown()

        }
    }

    public void testShutdown() {
        CacheFactory cf = new NoCacheFactory();
        cf.shutdown();
    }
}
View Full Code Here

Examples of org.chiba.web.WebAdapter.shutdown()

            // don't use getXFormsSession to avoid needless error
            if (xFormsSession == null) return;
            WebAdapter adapter = xFormsSession.getAdapter();
            if (adapter == null) return;
            adapter.shutdown();
        } catch (XFormsException e) {
            LOGGER.warn("FluxFacade close: " + sessionKey, e);
        } finally {
            manager.deleteXFormsSession(sessionKey);
        }
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.