Package framework
Class CrudExamples
java.lang.Object
framework.CrudExamples
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
create
(CuratorFramework client, String path, byte[] payload) static void
createEphemeral
(CuratorFramework client, String path, byte[] payload) static String
createEphemeralSequential
(CuratorFramework client, String path, byte[] payload) static void
createIdempotent
(CuratorFramework client, String path, byte[] payload) static void
delete
(CuratorFramework client, String path) static void
deleteIdempotent
(CuratorFramework client, String path, int currentVersion) static void
guaranteedDelete
(CuratorFramework client, String path) static void
setData
(CuratorFramework client, String path, byte[] payload) static void
setDataAsync
(CuratorFramework client, String path, byte[] payload) static void
setDataAsyncWithCallback
(CuratorFramework client, BackgroundCallback callback, String path, byte[] payload) static void
setDataIdempotent
(CuratorFramework client, String path, byte[] payload, int currentVersion) watchedGetChildren
(CuratorFramework client, String path) watchedGetChildren
(CuratorFramework client, String path, org.apache.zookeeper.Watcher watcher)
-
Constructor Details
-
CrudExamples
public CrudExamples()
-
-
Method Details
-
create
- Throws:
Exception
-
createEphemeral
public static void createEphemeral(CuratorFramework client, String path, byte[] payload) throws Exception - Throws:
Exception
-
createEphemeralSequential
public static String createEphemeralSequential(CuratorFramework client, String path, byte[] payload) throws Exception - Throws:
Exception
-
createIdempotent
public static void createIdempotent(CuratorFramework client, String path, byte[] payload) throws Exception - Throws:
Exception
-
setData
- Throws:
Exception
-
setDataAsync
public static void setDataAsync(CuratorFramework client, String path, byte[] payload) throws Exception - Throws:
Exception
-
setDataAsyncWithCallback
public static void setDataAsyncWithCallback(CuratorFramework client, BackgroundCallback callback, String path, byte[] payload) throws Exception - Throws:
Exception
-
setDataIdempotent
public static void setDataIdempotent(CuratorFramework client, String path, byte[] payload, int currentVersion) throws Exception - Throws:
Exception
-
delete
- Throws:
Exception
-
guaranteedDelete
- Throws:
Exception
-
deleteIdempotent
public static void deleteIdempotent(CuratorFramework client, String path, int currentVersion) throws Exception - Throws:
Exception
-
watchedGetChildren
public static List<String> watchedGetChildren(CuratorFramework client, String path) throws Exception - Throws:
Exception
-
watchedGetChildren
public static List<String> watchedGetChildren(CuratorFramework client, String path, org.apache.zookeeper.Watcher watcher) throws Exception - Throws:
Exception
-