|
The Zookeeper classIntroductionRepresents ZooKeeper session. Class synopsisZookeeper
class Zookeeper
{
/* Methods */
public
__construct(string
$host = '', callable $watcher_cb = null , int $recv_timeout = 10000)public
bool addAuth(string
$scheme , string $cert , callable $completion_cb = null )public
void close()
public
void connect(string
$host , callable $watcher_cb = null , int $recv_timeout = 10000)public
string create(
string $path ,string $value ,array $acls ,int $flags = null ) public
bool delete(string
$path , int $version = -1)public
array exists(string
$path , callable $watcher_cb = null )public
string get(
string $path ,callable $watcher_cb = null ,array &$stat = null ,int $max_size = 0) public
array getAcl(string
$path )public
array getChildren(string
$path , callable $watcher_cb = null )public
int getClientId()
public
ZookeeperConfig getConfig()
public
int getRecvTimeout()
public
int getState()
public
bool isRecoverable()
public
bool set(
string $path ,string $value ,int $version = -1,array &$stat = null ) public
bool setAcl(string
$path , int $version , array $acl )public
static
bool setDebugLevel(int
$logLevel )public
static
bool setDeterministicConnOrder(bool
$yesOrNo )public
bool setLogStream(resource
$stream )public
bool setWatcher(callable
$watcher_cb )/* Constants */
const
int
PERM_READ = 1;
const
int
PERM_WRITE = 2;
const
int
PERM_CREATE = 4;
const
int
PERM_DELETE = 8;
const
int
PERM_ADMIN = 16;
const
int
PERM_ALL = 31;
const
int
EPHEMERAL = 1;
const
int
SEQUENCE = 2;
const
int
LOG_LEVEL_ERROR = 1;
const
int
LOG_LEVEL_WARN = 2;
const
int
LOG_LEVEL_INFO = 3;
const
int
LOG_LEVEL_DEBUG = 4;
const
int
EXPIRED_SESSION_STATE = -112;
const
int
AUTH_FAILED_STATE = -113;
const
int
CONNECTING_STATE = 1;
const
int
ASSOCIATING_STATE = 2;
const
int
CONNECTED_STATE = 3;
const
int
READONLY_STATE = 5;
const
int
NOTCONNECTED_STATE = 999;
const
int
CREATED_EVENT = 1;
const
int
DELETED_EVENT = 2;
const
int
CHANGED_EVENT = 3;
const
int
CHILD_EVENT = 4;
const
int
SESSION_EVENT = -1;
const
int
NOTWATCHING_EVENT = -2;
const
int
SYSTEMERROR = -1;
const
int
RUNTIMEINCONSISTENCY = -2;
const
int
DATAINCONSISTENCY = -3;
const
int
CONNECTIONLOSS = -4;
const
int
MARSHALLINGERROR = -5;
const
int
UNIMPLEMENTED = -6;
const
int
OPERATIONTIMEOUT = -7;
const
int
BADARGUMENTS = -8;
const
int
INVALIDSTATE = -9;
const
int
NEWCONFIGNOQUORUM = -13;
const
int
RECONFIGINPROGRESS = -14;
const
int
OK = 0;
const
int
APIERROR = -100;
const
int
NONODE = -101;
const
int
NOAUTH = -102;
const
int
BADVERSION = -103;
const
int
NOCHILDRENFOREPHEMERALS = -108;
const
int
NODEEXISTS = -110;
const
int
NOTEMPTY = -111;
const
int
SESSIONEXPIRED = -112;
const
int
INVALIDCALLBACK = -113;
const
int
INVALIDACL = -114;
const
int
AUTHFAILED = -115;
const
int
CLOSING = -116;
const
int
NOTHING = -117;
const
int
SESSIONMOVED = -118;
const
int
NOTREADONLY = -119;
const
int
EPHEMERALONLOCALSESSION = -120;
const
int
NOWATCHER = -121;
const
int
RECONFIGDISABLED = -122;
}Predefined ConstantsZooKeeper Permissions
ZooKeeper Create Flags
ZooKeeper Log Levels
ZooKeeper States
ZooKeeper Watch Types
ZooKeeper System and Server-side Errors
ZooKeeper API Errors
|