C# Class Kafka.Client.ZooKeeperIntegration.ZooKeeperConnection

Abstracts connection with ZooKeeper server
Inheritance: IZooKeeperConnection
Afficher le fichier Open project: precog/kafka Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
EnsuresNotDisposed ( ) : void

Ensures object wasn't disposed

Method Details

Connect() public méthode

Connects to ZooKeeper server
public Connect ( IWatcher watcher ) : void
watcher IWatcher /// The watcher to be installed in ZooKeeper. ///
Résultat void

Create() public méthode

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. ///
Résultat string

Delete() public méthode

Deletes znode for a given path
public Delete ( string path ) : void
path string /// The given path. ///
Résultat void

Dispose() public méthode

Closes underlying ZooKeeper client
public Dispose ( ) : void
Résultat void

Exists() public méthode

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. ///
Résultat bool

GetChildren() public méthode

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. ///
Résultat IList

GetCreateTime() public méthode

Gets time when connetion was created
public GetCreateTime ( string path ) : long
path string /// The path. ///
Résultat long

ReadData() public méthode

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. ///
Résultat byte[]

WriteData() public méthode

Writes data for a given path
public WriteData ( string path, byte data ) : void
path string /// The given path. ///
data byte /// The data to write. ///
Résultat void

WriteData() public méthode

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 ///
Résultat void

ZooKeeperConnection() public méthode

Initializes a new instance of the ZooKeeperConnection class.
public ZooKeeperConnection ( string servers ) : System
servers string /// The list of ZooKeeper servers. ///
Résultat System

ZooKeeperConnection() public méthode

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. ///
Résultat System