Class ZookeeperRepository
- java.lang.Object
-
- org.apache.shardingsphere.mode.repository.cluster.zookeeper.ZookeeperRepository
-
- All Implemented Interfaces:
org.apache.shardingsphere.infra.instance.InstanceContextAware,org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI,ClusterPersistRepository,org.apache.shardingsphere.mode.spi.PersistRepository
public final class ZookeeperRepository extends Object implements ClusterPersistRepository, org.apache.shardingsphere.infra.instance.InstanceContextAware
Registry repository of ZooKeeper.
-
-
Constructor Summary
Constructors Constructor Description ZookeeperRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddelete(String key)List<String>getChildrenKeys(String key)StringgetDirectly(String key)StringgetType()voidinit(ClusterPersistRepositoryConfiguration config)booleanisExisted(String key)voidpersist(String key, String value)voidpersistEphemeral(String key, String value)voidpersistExclusiveEphemeral(String key, String value)voidsetInstanceContext(org.apache.shardingsphere.infra.instance.InstanceContext instanceContext)voidupdate(String key, String value)voidwatch(String key, DataChangedEventListener listener)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository
getDistributedLockHolder
-
-
-
-
Method Detail
-
init
public void init(ClusterPersistRepositoryConfiguration config)
- Specified by:
initin interfaceClusterPersistRepository
-
getChildrenKeys
public List<String> getChildrenKeys(String key)
- Specified by:
getChildrenKeysin interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
persist
public void persist(String key, String value)
- Specified by:
persistin interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
update
public void update(String key, String value)
- Specified by:
updatein interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
getDirectly
public String getDirectly(String key)
- Specified by:
getDirectlyin interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
isExisted
public boolean isExisted(String key)
- Specified by:
isExistedin interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
persistEphemeral
public void persistEphemeral(String key, String value)
- Specified by:
persistEphemeralin interfaceClusterPersistRepository
-
persistExclusiveEphemeral
public void persistExclusiveEphemeral(String key, String value)
- Specified by:
persistExclusiveEphemeralin interfaceClusterPersistRepository
-
delete
public void delete(String key)
- Specified by:
deletein interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
watch
public void watch(String key, DataChangedEventListener listener)
- Specified by:
watchin interfaceClusterPersistRepository
-
close
public void close()
- Specified by:
closein interfaceorg.apache.shardingsphere.mode.spi.PersistRepository
-
setInstanceContext
public void setInstanceContext(org.apache.shardingsphere.infra.instance.InstanceContext instanceContext)
- Specified by:
setInstanceContextin interfaceorg.apache.shardingsphere.infra.instance.InstanceContextAware
-
getType
public String getType()
- Specified by:
getTypein interfaceorg.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI
-
-