C# Класс Kafka.Client.ZooKeeperIntegration.ZooKeeperConnection

Abstracts connection with ZooKeeper server
Наследование: IZooKeeperConnection
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Connect ( IWatcher watcher ) : void

Connects to ZooKeeper server

Create ( string path, byte data, ZooKeeperNet.CreateMode mode ) : string

Creates znode using given create mode for given path and writes given data to it

Delete ( string path ) : void

Deletes znode for a given path

Dispose ( ) : void

Closes underlying ZooKeeper client

Exists ( string path, bool watch ) : bool

Checks whether znode for a given path exists.

GetChildren ( string path, bool watch ) : IList

Gets all children for a given path

GetCreateTime ( string path ) : long

Gets time when connetion was created

ReadData ( string path, Org.Apache.Zookeeper.Data.Stat stats, bool watch ) : byte[]

Fetches data from a given path in ZooKeeper

WriteData ( string path, byte data ) : void

Writes data for a given path

WriteData ( string path, byte data, int version ) : void

Writes data for a given path

ZooKeeperConnection ( string servers ) : System

Initializes a new instance of the ZooKeeperConnection class.

ZooKeeperConnection ( string servers, int sessionTimeout ) : System

Initializes a new instance of the ZooKeeperConnection class.

Приватные методы

Метод Описание
EnsuresNotDisposed ( ) : void

Ensures object wasn't disposed

Описание методов

Connect() публичный Метод

Connects to ZooKeeper server
public Connect ( IWatcher watcher ) : void
watcher IWatcher /// The watcher to be installed in ZooKeeper. ///
Результат void

Create() публичный Метод

Creates znode using given create mode for given path and writes given data to it
public Create ( string path, byte data, ZooKeeperNet.CreateMode mode ) : string
path string /// The given path. ///
data byte /// The data to write. ///
mode ZooKeeperNet.CreateMode /// The create mode. ///
Результат string

Delete() публичный Метод

Deletes znode for a given path
public Delete ( string path ) : void
path string /// The given path. ///
Результат void

Dispose() публичный Метод

Closes underlying ZooKeeper client
public Dispose ( ) : void
Результат void

Exists() публичный Метод

Checks whether znode for a given path exists.
public Exists ( string path, bool watch ) : bool
path string /// The given path. ///
watch bool /// Indicates whether should reinstall watcher in ZooKeeper. ///
Результат bool

GetChildren() публичный Метод

Gets all children for a given path
public GetChildren ( string path, bool watch ) : IList
path string /// The given path. ///
watch bool /// Indicates whether should reinstall watcher in ZooKeeper. ///
Результат IList

GetCreateTime() публичный Метод

Gets time when connetion was created
public GetCreateTime ( string path ) : long
path string /// The path. ///
Результат long

ReadData() публичный Метод

Fetches data from a given path in ZooKeeper
public ReadData ( string path, Org.Apache.Zookeeper.Data.Stat stats, bool watch ) : byte[]
path string /// The given path. ///
stats Org.Apache.Zookeeper.Data.Stat /// The statistics. ///
watch bool /// Indicates whether should reinstall watcher in ZooKeeper. ///
Результат byte[]

WriteData() публичный Метод

Writes data for a given path
public WriteData ( string path, byte data ) : void
path string /// The given path. ///
data byte /// The data to write. ///
Результат void

WriteData() публичный Метод

Writes data for a given path
public WriteData ( string path, byte data, int version ) : void
path string /// The given path. ///
data byte /// The data to write. ///
version int /// Expected version of data ///
Результат void

ZooKeeperConnection() публичный Метод

Initializes a new instance of the ZooKeeperConnection class.
public ZooKeeperConnection ( string servers ) : System
servers string /// The list of ZooKeeper servers. ///
Результат System

ZooKeeperConnection() публичный Метод

Initializes a new instance of the ZooKeeperConnection class.
public ZooKeeperConnection ( string servers, int sessionTimeout ) : System
servers string /// The list of ZooKeeper servers. ///
sessionTimeout int /// The session timeout. ///
Результат System