NAME

ZooKeeper::Constants

DESCRIPTION

A class for importing the ZooKeeper C library's enums. Also contains the library's zerror function for retriving string representations of error codes.

By default ZooKeeper::Constants imports all enums into a package. Individual enums can also be exported, along with an export tag for classes of enums

EXPORT TAGS

:errors

Error codes returned by the ZooKeeper C library. Includes the zerror function for returning a string corresponding to the error code.

zerror

ZOK
ZSYSTEMERROR
ZRUNTIMEINCONSISTENCY
ZDATAINCONSISTENCY
ZCONNECTIONLOSS
ZMARSHALLINGERROR
ZUNIMPLEMENTED
ZOPERATIONTIMEOUT
ZBADARGUMENTS
ZINVALIDSTATE
ZAPIERROR
ZNONODE
ZNOAUTH
ZBADVERSION
ZNOCHILDRENFOREPHEMERALS
ZNODEEXISTS
ZNOTEMPTY
ZSESSIONEXPIRED
ZINVALIDCALLBACK
ZINVALIDACL
ZAUTHFAILED
ZCLOSING
ZNOTHING

:node_flags

Flags that may be used during node creation.

ZOO_EPHEMERAL
ZOO_SEQUENCE

:acl_ids

ZOO_ANYONE_ID_UNSAFE
ZOO_AUTH_IDS

:acl_perms

ACL permissions that may be used for a nodes ACLs

zperm

ZOO_PERM_READ
ZOO_PERM_WRITE
ZOO_PERM_CREATE
ZOO_PERM_DELETE
ZOO_PERM_ADMIN
ZOO_PERM_ALL

:acls

A predefined set of ACLs.

ACLs can also be constructed manually, as an arrayref of hashrefs, where hashrefs include keys for id, scheme, and perms.

ZOO_OPEN_ACL_UNSAFE
ZOO_READ_ACL_UNSAFE
ZOO_CREATOR_ALL_ACL

:events

Possible ZooKeeper event types. These are used for the type key of the event hashref, passed to ZooKeeper watcher callbacks.

zevent

ZOO_CREATED_EVENT
ZOO_DELETED_EVENT
ZOO_CHANGED_EVENT
ZOO_CHILD_EVENT
ZOO_SESSION_EVENT
ZOO_NOTWATCHING_EVENT

:states

Possible ZooKeeper connection states. These are used for the state key of the event hashref, passed to ZooKeeper watcher callbacks.

zstate

ZOO_EXPIRED_SESSION_STATE
ZOO_AUTH_FAILED_STATE
ZOO_CONNECTING_STATE
ZOO_ASSOCIATING_STATE
ZOO_CONNECTED_STATE

FUNCTIONS

zerror

The ZooKeeper C API's zerror. Returns a string corresponding the error code.

zperm

Returns a string corresponding to the acl permission.

zevent

Returns a string corresponding to the event type.

zstate

Returns a string corresponding to the connection state.