ZooKeeperTable of Contents
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 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
bool 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
int getClientId
( void
)
public
int getRecvTimeout
( void
)
public
int getState
( void
)
public
bool isRecoverable
( void
)
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
integer
PERM_READ
= 1
;
const
integer
PERM_WRITE
= 2
;
const
integer
PERM_CREATE
= 4
;
const
integer
PERM_DELETE
= 8
;
const
integer
PERM_ADMIN
= 16
;
const
integer
PERM_ALL
= 31
;
const
integer
LOG_LEVEL_ERROR
= 1
;
const
integer
LOG_LEVEL_WARN
= 2
;
const
integer
LOG_LEVEL_INFO
= 3
;
const
integer
LOG_LEVEL_DEBUG
= 4
;
const
integer
EXPIRED_SESSION_STATE
= -112
;
const
integer
AUTH_FAILED_STATE
= -113
;
const
integer
CONNECTING_STATE
= 1
;
const
integer
ASSOCIATING_STATE
= 2
;
const
integer
CONNECTED_STATE
= 3
;
const
integer
READONLY_STATE
= 5
;
const
integer
NOTCONNECTED_STATE
= 999
;
}Predefined ConstantsZooKeeper Permissions
ZooKeeper Log Levels
ZooKeeper States
|