예제 #1
0
파일: ZkUtils.cs 프로젝트: ewhauser/kafka
 internal static void CreateEphemeralPath(IZooKeeperClient zkClient, string path, string data)
 {
     try
     {
         zkClient.CreateEphemeral(path, data);
     }
     catch (KeeperException.NoNodeException)
     {
         ZkUtils.CreateParentPath(zkClient, path);
         zkClient.CreateEphemeral(path, data);
     }
 }
예제 #2
0
 internal static void CreateEphemeralPath(IZooKeeperClient zkClient, string path, string data)
 {
     try
     {
         zkClient.CreateEphemeral(path, data);
     }
     catch (KeeperException.NoNodeException)
     {
         ZkUtils.CreateParentPath(zkClient, path);
         zkClient.CreateEphemeral(path, data);
     }
 }
예제 #3
0
 internal static void CreateEphemeralPath(IZooKeeperClient zkClient, string path, string data)
 {
     try
     {
         zkClient.CreateEphemeral(path, data);
     }
     catch (KeeperException e)
     {
         if (e.ErrorCode == KeeperException.Code.NONODE)
         {
             CreateParentPath(zkClient, path);
             zkClient.CreateEphemeral(path, data);
         }
         else
         {
             throw;
         }
     }
 }
예제 #4
0
 internal static void CreateEphemeralPath(IZooKeeperClient zkClient, string path, string data)
 {
     try
     {
         zkClient.CreateEphemeral(path, data);
     }
     catch (KeeperException e)
     {
         if (e.ErrorCode == KeeperException.Code.NONODE)
         {
             ZkUtils.CreateParentPath(zkClient, path);
             zkClient.CreateEphemeral(path, data);
         }
         else
             throw;
     }
 }