public interface IProvider
| 限定符和类型 | 方法和说明 |
|---|---|
void |
create(String key,
String value,
org.apache.zookeeper.CreateMode createMode)
Only create target node.
|
void |
delete(String key)
Only delete target node..
|
void |
delete(String key,
org.apache.zookeeper.AsyncCallback.VoidCallback callback,
Object ctx)
Only delete target node.
|
void |
executeContention(LeaderElection election)
Contention exec.
|
boolean |
exists(String key)
Check exist.
|
boolean |
exists(String key,
org.apache.zookeeper.Watcher watcher)
Check exist.
|
List<String> |
getChildren(String key)
Get children's keys.
|
byte[] |
getData(String key)
Get string type data.
|
void |
getData(String key,
org.apache.zookeeper.AsyncCallback.DataCallback callback,
Object ctx)
Get string type data.
|
String |
getDataString(String key)
Get string type data.
|
Stack<String> |
getDeletingPaths(String key)
Get path nodes that needed delete.
|
List<String> |
getNecessaryPaths(String key)
Get path nodes that needed create.
|
String |
getRealPath(String path)
Get real path with root.
|
void |
resetConnection()
Reset connection.
|
BaseTransaction |
transaction()
Create zookeeper transaction.
|
boolean |
update(String key,
String value)
Update.
|
String getDataString(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionbyte[] getData(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionvoid getData(String key, org.apache.zookeeper.AsyncCallback.DataCallback callback, Object ctx) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keycallback - callbackctx - ctxorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionboolean exists(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionboolean exists(String key, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keywatcher - watcherorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionList<String> getChildren(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionvoid create(String key, String value, org.apache.zookeeper.CreateMode createMode) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyvalue - valuecreateMode - create modeorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionboolean update(String key, String value) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyvalue - valueorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionvoid delete(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionvoid delete(String key, org.apache.zookeeper.AsyncCallback.VoidCallback callback, Object ctx) throws org.apache.zookeeper.KeeperException, InterruptedException
key - keycallback - callbackctx - ctxorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionList<String> getNecessaryPaths(String key)
key - keyStack<String> getDeletingPaths(String key)
key - keyvoid executeContention(LeaderElection election) throws org.apache.zookeeper.KeeperException, InterruptedException
election - electionorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - InterruptedExceptionvoid resetConnection()
BaseTransaction transaction()
Copyright © 2018. All rights reserved.