public abstract class Op extends Object
ZooKeeper.create(String, byte[], java.util.List, CreateMode)
,
ZooKeeper.create(String, byte[], java.util.List, CreateMode, org.apache.zookeeper.AsyncCallback.StringCallback, Object)
,
ZooKeeper.delete(String, int)
,
ZooKeeper.setData(String, byte[], int)
,
ZooKeeper.getData(String, boolean, Stat)
,
ZooKeeper.getChildren(String, boolean)
Modifier and Type | Class and Description |
---|---|
static class |
Op.Check |
static class |
Op.Create |
static class |
Op.CreateTTL |
static class |
Op.Delete |
static class |
Op.GetChildren |
static class |
Op.GetData |
static class |
Op.OpKind |
static class |
Op.SetData |
Modifier and Type | Method and Description |
---|---|
static Op |
check(String path,
int version)
Constructs an version check operation.
|
static Op |
create(String path,
byte[] data,
List<ACL> acl,
CreateMode createMode)
Constructs a create operation.
|
static Op |
create(String path,
byte[] data,
List<ACL> acl,
CreateMode createMode,
long ttl)
Constructs a create operation.
|
static Op |
create(String path,
byte[] data,
List<ACL> acl,
int flags)
Constructs a create operation.
|
static Op |
create(String path,
byte[] data,
List<ACL> acl,
int flags,
long ttl)
Constructs a create operation.
|
static Op |
delete(String path,
int version)
Constructs a delete operation.
|
static Op |
getChildren(String path) |
static Op |
getData(String path) |
Op.OpKind |
getKind()
Gets the kind of an Op.
|
String |
getPath()
Gets the path for an Op.
|
int |
getType()
Gets the integer type code for an Op.
|
static Op |
setData(String path,
byte[] data,
int version)
Constructs an update operation.
|
abstract Record |
toRequestRecord()
Encodes an op for wire transmission.
|
public static Op create(String path, byte[] data, List<ACL> acl, int flags)
path
- the path for the nodedata
- the initial data for the nodeacl
- the acl for the nodeflags
- specifying whether the node to be created is ephemeral
and/or sequential but using the integer encoding.ZooKeeper.create(String, byte[], java.util.List, CreateMode)
,
CreateMode.fromFlag(int)
public static Op create(String path, byte[] data, List<ACL> acl, int flags, long ttl)
path
- the path for the nodedata
- the initial data for the nodeacl
- the acl for the nodeflags
- specifying whether the node to be created is ephemeral
and/or sequential but using the integer encoding.ttl
- optional ttl or 0 (flags must imply a TTL creation mode)ZooKeeper.create(String, byte[], java.util.List, CreateMode)
,
CreateMode.fromFlag(int)
public static Op create(String path, byte[] data, List<ACL> acl, CreateMode createMode)
path
- the path for the nodedata
- the initial data for the nodeacl
- the acl for the nodecreateMode
- specifying whether the node to be created is ephemeral
and/or sequentialZooKeeper.create(String, byte[], java.util.List, CreateMode)
public static Op create(String path, byte[] data, List<ACL> acl, CreateMode createMode, long ttl)
path
- the path for the nodedata
- the initial data for the nodeacl
- the acl for the nodecreateMode
- specifying whether the node to be created is ephemeral
and/or sequentialttl
- optional ttl or 0 (createMode must imply a TTL)ZooKeeper.create(String, byte[], java.util.List, CreateMode)
public static Op delete(String path, int version)
path
- the path of the node to be deleted.version
- the expected node version.ZooKeeper.delete(String, int)
public static Op setData(String path, byte[] data, int version)
path
- the path of the nodedata
- the data to setversion
- the expected matching versionZooKeeper.setData(String, byte[], int)
public static Op check(String path, int version)
path
- the path of the nodeversion
- the expected matching versionpublic int getType()
ZooDefs.OpCode
public String getPath()
public Op.OpKind getKind()
public abstract Record toRequestRecord()
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.