public class CuratorFabricRegistryImpl extends Object implements FabricRegistry
FabricRegistry using Apache Curator library.| Constructor and Description |
|---|
CuratorFabricRegistryImpl(String zookeeperUrl,
String zookeeperPassword,
long timeoutSeconds,
String containerName) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connect to registry.
|
void |
disconnect()
Disconnect from registry closing any resources.
|
String[] |
getContainerProfiles(String containerVersion)
Gets container profiles.
|
String |
getContainerVersion()
Gets container version.
|
String |
getTextNode(String key)
Reads a text node from the specified zookeeper location.
|
static boolean |
isSupported() |
void |
writeTextNode(String key,
String value)
Writes a test node to the specified zookeeper location.
|
public static boolean isSupported()
public void connect()
throws Exception
FabricRegistryconnect in interface FabricRegistryException - on error.public void disconnect()
throws Exception
FabricRegistrydisconnect in interface FabricRegistryException - on errorpublic String getContainerVersion() throws Exception
FabricRegistrygetContainerVersion in interface FabricRegistryException - on error.public String[] getContainerProfiles(String containerVersion) throws Exception
FabricRegistrygetContainerProfiles in interface FabricRegistrycontainerVersion - container's current version.Exception - on error.public void writeTextNode(String key, String value) throws Exception
FabricRegistrywriteTextNode in interface FabricRegistrykey - In Zookeeper registry.Exception - on error.public String getTextNode(String key) throws Exception
FabricRegistrygetTextNode in interface FabricRegistrykey - In Zookeeper registry.Exception - on error.Copyright © 2016. All rights reserved.