|
The Zookeeper class
(PECL zookeeper >= 0.1.0)
はじめに
Represents ZooKeeper session.
クラス概要
Zookeeper
{
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
string get
( string $path
[, callable $watcher_cb = null
[, array &$stat = null
[, int $max_size = 0
]]] )
public
array getAcl
( string $path
)
public
bool set
( string $path
, string $value
[, int $version = -1
[, array &$stat = null
]] )
public
bool setAcl
( string $path
, int $version
, array $acl
)
}
定義済み定数
ZooKeeper Permissions
Zookeeper::PERM_READ
-
Can read nodes value and list its children
Zookeeper::PERM_WRITE
-
Can set the nodes value
Zookeeper::PERM_CREATE
-
Can create children
Zookeeper::PERM_DELETE
-
Can delete children
Zookeeper::PERM_ADMIN
-
Can execute set_acl()
Zookeeper::PERM_ALL
-
All of the above flags ORd together
ZooKeeper Log Levels
Zookeeper::LOG_LEVEL_ERROR
-
Outputs only error mesages
Zookeeper::LOG_LEVEL_WARN
-
Outputs errors/warnings
Zookeeper::LOG_LEVEL_INFO
-
Outputs big action messages besides errors/warnings
Zookeeper::LOG_LEVEL_DEBUG
-
Outputs all
ZooKeeper States
Zookeeper::EXPIRED_SESSION_STATE
-
Connected but session expired
Zookeeper::AUTH_FAILED_STATE
-
Connected but auth failed
Zookeeper::CONNECTING_STATE
-
Connecting
Zookeeper::ASSOCIATING_STATE
-
Associating
Zookeeper::CONNECTED_STATE
-
Connected
Zookeeper::READONLY_STATE
-
TODO: help us improve this extension.
Zookeeper::NOTCONNECTED_STATE
-
Connection failed
目次
|
|
|