Example usage for org.apache.zookeeper ZooKeeper create

List of usage examples for org.apache.zookeeper ZooKeeper create

Introduction

In this page you can find the example usage for org.apache.zookeeper ZooKeeper create.

Prototype

public void create(final String path, byte[] data, List<ACL> acl, CreateMode createMode, Create2Callback cb,
        Object ctx, long ttl) 

Source Link

Document

The asynchronous version of create with ttl.

Usage

From source file:org.apache.curator.framework.imps.CreateZK35.java

License:Apache License

static void create(ZooKeeper zooKeeper, String path, byte data[], List<ACL> acl, CreateMode createMode,
        final CompatibleCreateCallback compatibleCallback, Object ctx, long ttl) {
    AsyncCallback.Create2Callback callback = new AsyncCallback.Create2Callback() {
        @Override// w w w  .j ava  2  s.  c  o m
        public void processResult(int rc, String path, Object ctx, String name, Stat stat) {
            compatibleCallback.processResult(rc, path, ctx, name, stat);
        }
    };
    zooKeeper.create(path, data, acl, createMode, callback, ctx, ttl);
}