pub enum CreateMode {
Persistent = 0,
Ephemeral = 1,
PersistentSequential = 2,
EphemeralSequential = 3,
Container = 4,
PersistentWithTTL = 5,
PersistentSequentialWithTTL = 6,
}
Expand description
CreateMode value determines how the znode is created on ZooKeeper.
Variants§
Persistent = 0
The znode will not be automatically deleted upon client’s disconnect.
Ephemeral = 1
The znode will be deleted upon the client’s disconnect.
PersistentSequential = 2
The name of the znode will be appended with a monotonically increasing number. The actual
path name of a sequential node will be the given path plus a suffix "i"
where i is the
current sequential number of the node. The sequence number is always fixed length of 10
digits, 0 padded. Once such a node is created, the sequential number will be incremented by
one.
EphemeralSequential = 3
The znode will be deleted upon the client’s disconnect, and its name will be appended with a monotonically increasing number.
Container = 4
Container nodes are special purpose nodes useful for recipes such as leader, lock, etc. When
the last child of a container is deleted, the container becomes a candidate to be deleted by
the server at some point in the future. Given this property, you should be prepared to get
ZkError::NoNode
when creating children inside of this container node.
PersistentWithTTL = 5
The znode will not be automatically deleted upon client’s disconnect, but it will be deleted if it has not been modified within the given TTL and has no children.
PersistentSequentialWithTTL = 6
The same as PersistentSequential
, but the znode will be deleted if it has not been
modified within the given TTL and has no children.
Implementations§
Source§impl CreateMode
impl CreateMode
Trait Implementations§
Source§impl Clone for CreateMode
impl Clone for CreateMode
Source§fn clone(&self) -> CreateMode
fn clone(&self) -> CreateMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more