Examples of asPath()


Examples of com.nokia.dempsy.config.ClusterId.asPath()

               // now push the cluster into backup node.
               ClusterInfoSession originalSession = dempsy.getCluster(new ClusterId("test-app","test-cluster1")).getNodes().get(0).retouRteg().getClusterSession();
               ClusterInfoSessionFactory factory = dempsy.getClusterSessionFactory();

               session = TestUtils.stealShard(originalSession, factory, clusterId.asPath() + "/" + String.valueOf(0),baseTimeoutMillis);

               // If we got here then the MpContainer is on standby and the number of Mps should
               // drop to zero.
               assertTrue(poll(baseTimeoutMillis, statsCollector,
                     new Condition<MetricGetters>() { @Override public boolean conditionMet(MetricGetters sc)
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

               // now push the cluster into backup node.
               ClusterInfoSession originalSession = dempsy.getCluster(new ClusterId("test-app","test-cluster1")).getNodes().get(0).retouRteg().getClusterSession();
               ClusterInfoSessionFactory factory = dempsy.getClusterSessionFactory();

               String path = clusterId.asPath() + "/" + String.valueOf(0);
               session = TestUtils.stealShard(originalSession, factory, path,baseTimeoutMillis);
               DefaultRouterSlotInfo si = (DefaultRouterSlotInfo)session.getData(path, null);
               assertTrue(si.getDestination() instanceof JunkDestination); // checks to see who actually has the slot.

               // we will keep disrupting the session but we should still end up with zero mps.
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

         // And join should work
         gotCorrectError = true;
         for (long endTime = System.currentTimeMillis() + baseTimeoutMillis; endTime > System.currentTimeMillis() && gotCorrectError;)
         {
            Thread.sleep(1);
            try { session.mkdir(clusterId.asPath() + "/join-1", null, DirMode.EPHEMERAL); gotCorrectError = false; } catch (ClusterInfoException e) {  }
         }
        
         assertFalse(gotCorrectError);
      }
      finally
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

            {
               try
               {
                  called.set(true);
                  logger.trace("process called on TestWatcher.");
                  session.exists(clusterId.asPath(), this);
                  session.getSubdirs(clusterId.asPath(), this);
               }
               catch (ClusterInfoException cie)
               {
                  throw new RuntimeException(cie);
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

               try
               {
                  called.set(true);
                  logger.trace("process called on TestWatcher.");
                  session.exists(clusterId.asPath(), this);
                  session.getSubdirs(clusterId.asPath(), this);
               }
               catch (ClusterInfoException cie)
               {
                  throw new RuntimeException(cie);
               }
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

               }
            }
         }));
        
         createClusterLevel(clusterId,session);
         assertTrue(session.exists(clusterId.asPath(), callback));
      }
      finally
      {
         if (server != null)
            server.shutdown();
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

         TestWatcher callback = new TestWatcher(session)
         {
            @Override public void process()
            {
               try {
                  session.getSubdirs(clusterId.asPath(),this);
                  called.set(true);
               }
               catch (ClusterInfoException cie) { throw new RuntimeException(cie); }
            }
         };
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

            public boolean conditionMet(ClusterId o) throws Throwable {
               try { TestUtils.createClusterLevel(o, session); session.mkdir(o.asPath() + "/join-1", null, DirMode.EPHEMERAL); return true; } catch (ClusterInfoException e) { return false; }
            }
         }));
        
         session.getSubdirs(clusterId.asPath(),callback);
        
         // And join should work
         // And join should work
         assertTrue(TestUtils.poll(baseTimeoutMillis,clusterId , new Condition<ClusterId>()
         {
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

      Dempsy dempsy = (Dempsy)context.getBean("dempsy");
      ClusterInfoSessionFactory factory = dempsy.getClusterSessionFactory();
      ClusterInfoSession session = factory.createSession();
      ClusterId curCluster = new ClusterId("test-app", "test-cluster1");
      TestUtils.createClusterLevel(curCluster, session);
      session.setData(curCluster.asPath(), new DecentralizedRoutingStrategy.DefaultRouterClusterInfo(20,2));
      session.stop();
      dempsy.stop();
   }
  
View Full Code Here

Examples of com.nokia.dempsy.config.ClusterId.asPath()

            ClusterInfoSession session = factory.createSession();
            assertNotNull(pass,session);
            sessionsToClose.add(session);
            String clusterPath = createClusterLevel(cid, session);
           
            assertEquals(clusterPath,cid.asPath());
           
            assertNotNull(pass,clusterPath);
            assertTrue(pass,session.exists(clusterPath, null));
           
            // there should be nothing currently registered
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.