Using the Java client library
The ZooKeeper Java bindings for the development of applications are mainly composed of two Java packages:
org.apache.zookeeper
org.apache.zookeeper.data
The package org.apache.zookeeper
is composed of the interface definition for ZooKeeper watches and various callback handlers of ZooKeeper. It defines the main class of the ZooKeeper client library along with many static definitions of the ZooKeeper event types and states. The org.apache.zookeeper.data package
defines the characteristics associated with the data registers, also known as znodes, such as Access Control Lists (ACL), IDs, stats, and so on.
The org.apache.zookeeper.server
, org.apache.zookeeper.server.quorum
, and org.apache.zookeeper.server.upgrade
packages in the ZooKeeper Java APIs are part of the server implementation. The package org.apache.zookeeper.client
defines the class of Four Letter Word, which is used to enquire the state of the ZooKeeper server.
Tip
Refer to Chapter 1, A Crash Course in Apache...