public class BaseProvider extends Object implements IProvider
| 构造器和说明 |
|---|
BaseProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public final String getDataString(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
IProvidergetDataString 在接口中 IProviderkey - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final byte[] getData(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
IProvidergetData 在接口中 IProviderkey - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final void getData(String key, org.apache.zookeeper.AsyncCallback.DataCallback callback, Object ctx)
IProviderpublic final boolean exists(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
IProviderexists 在接口中 IProviderkey - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final boolean exists(String key, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
IProviderexists 在接口中 IProviderkey - keywatcher - watcherorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final List<String> getChildren(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
IProvidergetChildren 在接口中 IProviderkey - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final void create(String key, String value, org.apache.zookeeper.CreateMode createMode) throws org.apache.zookeeper.KeeperException, InterruptedException
IProvidercreate 在接口中 IProviderkey - keyvalue - valuecreateMode - create modeorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final boolean update(String key, String value) throws org.apache.zookeeper.KeeperException, InterruptedException
IProviderupdate 在接口中 IProviderkey - keyvalue - valueorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final void delete(String key) throws org.apache.zookeeper.KeeperException, InterruptedException
IProviderdelete 在接口中 IProviderkey - keyorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - interrupted exceptionpublic final void delete(String key, org.apache.zookeeper.AsyncCallback.VoidCallback callback, Object ctx)
IProviderpublic final String getRealPath(String path)
IProvidergetRealPath 在接口中 IProviderpath - pathpublic final List<String> getNecessaryPaths(String key)
IProvidergetNecessaryPaths 在接口中 IProviderkey - keypublic final Stack<String> getDeletingPaths(String key)
IProvidergetDeletingPaths 在接口中 IProviderkey - keypublic final void executeContention(LeaderElection election) throws org.apache.zookeeper.KeeperException, InterruptedException
IProviderexecuteContention 在接口中 IProviderelection - electionorg.apache.zookeeper.KeeperException - zookeeper exceptionInterruptedException - InterruptedExceptionpublic final void resetConnection()
IProviderresetConnection 在接口中 IProviderpublic BaseTransaction transaction()
IProvidertransaction 在接口中 IProviderCopyright © 2018. All rights reserved.