Examples of asPath()


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

               {
                  processCalled.set(true);
               }
            };
           
            assertTrue(session.exists(cid.asPath(), watcher));

            String data = "HelloThere";
            session.setData(clusterPath,data);
           
            assertTrue(poll(5000, null, new Condition<Object>()
View Full Code Here

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

               {
                  done = true;
                 
                  try
                  {
                     if (session.getSubdirs(clusterId.asPath(), this).size() == 0)
                        session.mkdir(clusterId.asPath() + "/slot1",null,DirMode.EPHEMERAL);
                     called.set(true);
                  }
                  catch(ClusterInfoException.NoNodeException e)
                  {
View Full Code Here

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

                  done = true;
                 
                  try
                  {
                     if (session.getSubdirs(clusterId.asPath(), this).size() == 0)
                        session.mkdir(clusterId.asPath() + "/slot1",null,DirMode.EPHEMERAL);
                     called.set(true);
                  }
                  catch(ClusterInfoException.NoNodeException e)
                  {
                     try
View Full Code Here

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

               }
            }

         };

         cluster.exists(clusterId.asPath(), callback);
         callback.process();
        
         // create another session and look
         ZookeeperSession session2 = (ZookeeperSession)factory.createSession();
         assertEquals(1,session2.getSubdirs(new ClusterId(appname,"testBouncingServer").asPath(), null).size());
View Full Code Here

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

               {
                  done = true;
                 
                  try
                  {
                     if (session.getSubdirs(clusterId.asPath(), this).size() == 0)
                        session.mkdir(clusterId.asPath() + "/slot1",null,DirMode.EPHEMERAL);
                     called.set(true);
                  }
                  catch(ClusterInfoException.NoNodeException e)
                  {
View Full Code Here

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

                  done = true;
                 
                  try
                  {
                     if (session.getSubdirs(clusterId.asPath(), this).size() == 0)
                        session.mkdir(clusterId.asPath() + "/slot1",null,DirMode.EPHEMERAL);
                     called.set(true);
                  }
                  catch(ClusterInfoException.NoNodeException e)
                  {
                     try
View Full Code Here

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

               }
            }

         };

         cluster.exists(clusterId.asPath(), callback);
         callback.process();
        
         // create another session and look
         ZookeeperSession session2 = (ZookeeperSession)factory.createSession();
         assertEquals(1,session2.getSubdirs(new ClusterId(appname,"testBouncingServerWithCleanDataDir").asPath(), null).size());
View Full Code Here

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

         @Override public void process() { called.set(true); }
      };
     
      // now accessing the cluster should get us an error.
      boolean gotCorrectError = false;
      try { session.getSubdirs(clusterId.asPath(), callback); } catch (ClusterInfoException e) { gotCorrectError = true; }
      assertTrue(gotCorrectError);
     
      // now lets startup the server.
      ZookeeperTestServer server = null;
      try
View Full Code Here

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

         // now see if the cluster works.
         assertTrue(TestUtils.poll(baseTimeoutMillis, callback, new Condition<TestWatcher>() {
            @Override public boolean conditionMet(TestWatcher o){  return !o.called.get(); }
         }));

         session.getSubdirs(clusterId.asPath(), callback);
        
         ZooKeeper origZk = session.zkref.get();
         ZookeeperTestServer.forceSessionExpiration(origZk);
        
         // wait for the callback
View Full Code Here

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

         // however, they should eventually recover.
         gotCorrectError = true;
         for (long endTime = System.currentTimeMillis() + baseTimeoutMillis; endTime > System.currentTimeMillis() && gotCorrectError;)
         {
            Thread.sleep(1);
            try { session.getSubdirs(clusterId.asPath(), callback); gotCorrectError = false; } catch (ClusterInfoException e) {  }
         }

         session.getSubdirs(clusterId.asPath(), callback);

         // And join should work
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.