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); } }
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; } } }
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; } }