Package org.jgroups.stack

Examples of org.jgroups.stack.GossipRouter.start()


         String stackName = "tunnel1";
        
         log.info("DRMTestCase.testIsMasterReplica() - starting GossipRouter");
         // router characteristics here must match the definition in the stack configuration
         router = new GossipRouter(12001, "localhost");
         router.start();
         Thread.sleep(10000);
         log.info("router routing table = " + router.dumpRoutingTable());
         assertTrue("router is started", router.isStarted());
         assertTrue("router is running", router.isRunning());
        
View Full Code Here


         //Restore the local replicant        
         drm1.add(SERVICEA, "valueA1a");
        
         // simulate a merge
         log.info("DRMTestCase.testIsMasterReplica() - restarting GossipRouter");
         router.start();
         // it seems to take more than 15 seconds for the merge to take effect
         sleepThread(30000);
        
         assertTrue(router.isStarted());
View Full Code Here

      **/
     public void testDisconnectConnectSendTwo_TUNNEL() throws Exception {
        GossipRouter router=null;
        try {
            router=new GossipRouter();
            router.start();
            final Promise msgPromise=new Promise();
            JChannel coordinator=createChannel();
            setProps(coordinator);
            coordinator.setReceiver(new PromisedMessageListener(msgPromise));
            coordinator.connect("testgroup");
View Full Code Here

     **/
    public void testNullLocalAddress_TUNNEL() throws Exception {
        GossipRouter router=null;
        try {
            router=new GossipRouter();
            router.start();
            channel = createChannel();
            channel.connect("testgroup");
            assertNotNull(channel.getLocalAddress());
            channel.disconnect();
            assertNull(channel.getLocalAddress());
View Full Code Here

      **/
     public void testDisconnectConnectOne_TUNNEL() throws Exception {
        GossipRouter router=null;
        try {
            router=new GossipRouter();
            router.start();
            channel=createChannel();
            channel.connect("testgroup1");
            channel.disconnect();
            channel.connect("testgroup2");
            View view=channel.getView();
View Full Code Here

    public void testConnectTwo_TUNNEL() throws Exception {
        GossipRouter router=null;
         try {
             router=new GossipRouter();
             router.start();
             JChannel coordinator=createChannel();
             setProps(coordinator);
             coordinator.connect("testConnectTwo_TUNNEL");
             channel=createChannel();
             setProps(channel);
View Full Code Here

      **/
     public void testDisconnectConnectTwo_TUNNEL() throws Exception {
         GossipRouter router=null;
         try {
             router=new GossipRouter();
             router.start();
             JChannel coordinator=createChannel();
             setProps(coordinator);
             coordinator.connect("testgroup");
             channel=createChannel();
             setProps(channel);
View Full Code Here

         String stackName = "tunnel1";
        
         log.info("DRMTestCase.testIsMasterReplica() - starting GossipRouter");
         // router characteristics here must match the definition in the stack configuration
         router = new GossipRouter(12001, "127.0.0.1");
         router.start();
         Thread.sleep(10000);
        
         JChannelFactory factory1 = new JChannelFactory();
         factory1.setMultiplexerConfig(muxFile);
         factory1.setNamingServicePort(1099);
View Full Code Here

         //Restore the local replicant        
         drm1.add(SERVICEA, "valueA1a");
        
         // simulate a merge
         log.info("DRMTestCase.testIsMasterReplica() - restarting GossipRouter");
         router.start();
         // it seems to take more than 15 seconds for the merge to take effect
         sleepThread(30000);
        
         assertTrue(router.isStarted());
View Full Code Here


   public static void main(String[] args) throws Exception
   {
      GossipRouter router = new GossipRouter(12000, "localhost");
      router.start();

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