- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中io.fabric8.zookeeper.ZkPath.getPath()
方法的一些代码示例,展示了ZkPath.getPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkPath.getPath()
方法的具体详情如下:
包路径:io.fabric8.zookeeper.ZkPath
类名称:ZkPath
方法名:getPath
[英]Gets path.
[中]获取路径。
代码示例来源:origin: io.fabric8/fabric-zookeeper
/**
* Returns the path of the profile.
* @param version
* @param id
* @return
*/
public static String getProfilePath(String version, String id) {
if (ENSEMBLE_PROFILE_PATTERN.matcher(id).matches()) {
return ZkPath.CONFIG_ENSEMBLE_PROFILE.getPath(id);
} else return ZkPath.CONFIG_VERSIONS_PROFILE.getPath(version, id);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
/**
* Returns the path of the profile.
* @param version
* @param id
* @return
*/
public static String getPath(String version, String id) {
if (ENSEMBLE_PROFILE_PATTERN.matcher(id).matches()) {
return ZkPath.CONFIG_ENSEMBLE_PROFILE.getPath(id);
} else return ZkPath.CONFIG_VERSIONS_PROFILE.getPath(version, id);
}
}
代码示例来源:origin: io.fabric8/fabric-core-agent-jclouds
public synchronized void clear() {
cache.cleanUp();
try {
for (String nodeId : keySet()) {
deleteSafe(curator, ZkPath.CLOUD_NODE_IDENTITY.getPath(nodeId));
deleteSafe(curator, ZkPath.CLOUD_NODE_CREDENTIAL.getPath(nodeId));
}
} catch (Exception e) {
LOGGER.warn("Failed to clear zookeeper jclouds credentials store.", e);
}
}
代码示例来源:origin: io.fabric8/fabric-commands
@Override
protected Object doExecute() throws Exception {
if (exists(getCurator(), ZkPath.AUTHENTICATION_CRYPT_ALGORITHM.getPath()) != null) {
System.out.println(getStringData(getCurator(), ZkPath.AUTHENTICATION_CRYPT_ALGORITHM.getPath()));
}
return null;
}
}
代码示例来源:origin: io.fabric8/fabric-maven-proxy
private void register(String type) {
unregister(type);
try {
String mavenProxyUrl = "${zk:" + name + "/http}/maven/" + type + "/";
String parentPath = ZkPath.MAVEN_PROXY.getPath(type);
String path = parentPath + "/p_";
registeredProxies.get(type).add(create(curator.get(), path, mavenProxyUrl, CreateMode.EPHEMERAL_SEQUENTIAL));
} catch (Exception e) {
LOGGER.warn("Failed to register maven proxy.");
}
}
代码示例来源:origin: io.fabric8/fabric-git-server
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
counter = new SharedCount(curator, ZkPath.GIT_TRIGGER.getPath(), 0);
counter.start();
} catch (Exception ex) {
LOGGER.error("Error starting SharedCount", ex);
throw new ServletException("Error starting SharedCount", ex);
}
}
代码示例来源:origin: io.fabric8/fabric-partition
public TaskCoordinator(TaskContext context, WorkItemRepository repository, BalancingPolicy balancingPolicy, CuratorFramework curator) {
this.context = context;
this.repository = repository;
this.balancingPolicy = balancingPolicy;
this.curator = curator;
this.group = new ZooKeeperGroup<WorkerNode>(curator, ZkPath.TASK.getPath(context.getId()), WorkerNode.class);
}
代码示例来源:origin: io.fabric8/fabric-partition
public TaskHandler(String name, TaskContext context, CuratorFramework curator, Worker worker, WorkItemRepository repository) {
this.name = name;
this.context = context;
this.curator = curator;
this.worker = worker;
this.repository = repository;
this.workerPath = ZkPath.TASK_MEMBER_PARTITIONS.getPath(name, context.getId());
this.cache = new NodeCache(curator, workerPath);
}
代码示例来源:origin: io.fabric8/fabric-commands
@Override
protected Object doExecute() throws Exception {
if (exists(getCurator(), ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath()) != null) {
System.out.println(PasswordEncoder.decode(getStringData(getCurator(), ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath())));
}
return null;
}
}
代码示例来源:origin: io.fabric8/fabric-commands
@Override
protected Object doExecute() throws Exception {
if (Strings.isNotBlank(newAlgorithm)) {
setData(getCurator(), ZkPath.AUTHENTICATION_CRYPT_ALGORITHM.getPath(), newAlgorithm);
}
return null;
}
}
代码示例来源:origin: io.fabric8/fabric-git
@Activate
void activate() throws IOException {
activateComponent();
group = new ZooKeeperGroup<GitNode>(curator.get(), ZkPath.GIT.getPath(), GitNode.class);
group.add(this);
group.start();
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public String getClusterId() {
assertValid();
try {
return getStringData(curator.get(), ZkPath.CONFIG_ENSEMBLES.getPath());
} catch (Exception e) {
throw FabricException.launderThrowable(e);
}
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
counter = new SharedCount(curator, ZkPath.GIT_TRIGGER.getPath(), 0);
counter.start();
} catch (Exception ex) {
handleException(ex);
}
}
代码示例来源:origin: io.fabric8/fabric-commands
@Override
protected Object doExecute() throws Exception {
if (Strings.isNotBlank(newPassword)) {
setData(getCurator(), ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath(), PasswordEncoder.encode(newPassword));
}
return null;
}
}
代码示例来源:origin: io.fabric8/fabric-openshift
@Activate
void activate(Map<String, ?> configuration) {
//this.realm = properties != null && properties.containsKey(REALM_PROPERTY_NAME) ? properties.get(REALM_PROPERTY_NAME) : DEFAULT_REALM;
//this.role = properties != null && properties.containsKey(ROLE_PROPERTY_NAME) ? properties.get(ROLE_PROPERTY_NAME) : DEFAULT_ROLE;
group = new ZooKeeperGroup(curator.get(), ZkPath.OPENSHIFT.getPath(), ControllerNode.class);
group.add(this);
group.update(createState());
group.start();
activateComponent();
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public Map<String, String> getEnsembleConfiguration() throws Exception {
String clusterId = getStringData(obtainValid(curator), ZkPath.CONFIG_ENSEMBLES.getPath());
String versionId = dataStore.get().getDefaultVersion();
String profileId = "fabric-ensemble-" + clusterId;
String ensembleConfigName = "io.fabric8.zookeeper.server-" + clusterId + ".properties";
Profile ensembleProfile = profileRegistry.get().getRequiredProfile(versionId, profileId);
Map<String, byte[]> fileconfigs = ensembleProfile.getFileConfigurations();
return DataStoreUtils.toMap(fileconfigs.get(ensembleConfigName));
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public void setContainerMetadata(CreateContainerMetadata metadata) {
assertValid();
//We encode the metadata so that they are more friendly to import/export.
try {
setData(curator.get(), ZkPath.CONTAINER_METADATA.getPath(metadata.getContainerName()), Base64Encoder.encode(ObjectUtils.toBytes(metadata)));
} catch (Exception e) {
throw FabricException.launderThrowable(e);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric8-runtime-container-tomcat-registration
private void registerHttp(Container container) throws Exception {
boolean httpEnabled = isHttpEnabled();
boolean httpsEnabled = isHttpsEnabled();
String protocol = httpsEnabled && !httpEnabled ? "https" : "http";
int httpPort = httpsEnabled && !httpEnabled ? getHttpsPort() : getHttpPort();
String httpUrl = getHttpUrl(protocol, container.getId(), httpPort);
ZooKeeperUtils.setData(curator.get(), CONTAINER_HTTP.getPath(container.getId()), httpUrl);
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-wildfly-registration
private void registerHttp(Container container) throws Exception {
boolean httpEnabled = isHttpEnabled();
boolean httpsEnabled = isHttpsEnabled();
String protocol = httpsEnabled && !httpEnabled ? "https" : "http";
int httpPort = httpsEnabled && !httpEnabled ? getHttpsPort() : getHttpPort();
String httpUrl = getHttpUrl(protocol, container.getId(), httpPort);
ZooKeeperUtils.setData(curator.get(), CONTAINER_HTTP.getPath(container.getId()), httpUrl);
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-tomcat-registration
private void registerHttp(Container container) throws Exception {
boolean httpEnabled = isHttpEnabled();
boolean httpsEnabled = isHttpsEnabled();
String protocol = httpsEnabled && !httpEnabled ? "https" : "http";
int httpPort = httpsEnabled && !httpEnabled ? getHttpsPort() : getHttpPort();
String httpUrl = getHttpUrl(protocol, container.getId(), httpPort);
ZooKeeperUtils.setData(curator.get(), CONTAINER_HTTP.getPath(container.getId()), httpUrl);
}
本文整理了Java中io.fabric8.zookeeper.ZkPath.loadURL()方法的一些代码示例,展示了ZkPath.loadURL()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中io.fabric8.zookeeper.ZkPath.getPath()方法的一些代码示例,展示了ZkPath.getPath()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中org.apache.curator.utils.ZKPaths.makePath()方法的一些代码示例,展示了ZKPaths.makePath()的具体用法。这些代码示例主要来源
本文整理了Java中org.apache.curator.utils.ZKPaths.getNodeFromPath()方法的一些代码示例,展示了ZKPaths.getNodeFromPath()的具
本文整理了Java中org.apache.curator.utils.ZKPaths.fixForNamespace()方法的一些代码示例,展示了ZKPaths.fixForNamespace()的具
本文整理了Java中org.apache.curator.utils.ZKPaths.getPathAndNode()方法的一些代码示例,展示了ZKPaths.getPathAndNode()的具体用
本文整理了Java中org.apache.curator.utils.ZKPaths.deleteChildren()方法的一些代码示例,展示了ZKPaths.deleteChildren()的具体用
本文整理了Java中org.apache.curator.utils.ZKPaths.mkdirs()方法的一些代码示例,展示了ZKPaths.mkdirs()的具体用法。这些代码示例主要来源于Git
本文整理了Java中me.hao0.antares.common.util.ZkPaths.pathOfServer()方法的一些代码示例,展示了ZkPaths.pathOfServer()的具体用法
本文整理了Java中me.hao0.antares.common.util.ZkPaths.pathOfAppClients()方法的一些代码示例,展示了ZkPaths.pathOfAppClient
本文整理了Java中me.hao0.antares.common.util.ZkPaths.pathOfJobInstances()方法的一些代码示例,展示了ZkPaths.pathOfJobInst
本文整理了Java中me.hao0.antares.common.util.ZkPaths.pathOfJobInstance()方法的一些代码示例,展示了ZkPaths.pathOfJobInsta
本文整理了Java中me.hao0.antares.common.util.ZkPaths.lastNode()方法的一些代码示例,展示了ZkPaths.lastNode()的具体用法。这些代码示例主
本文整理了Java中com.netflix.curator.utils.ZKPaths.getNodeFromPath()方法的一些代码示例,展示了ZKPaths.getNodeFromPath()的
本文整理了Java中com.netflix.curator.utils.ZKPaths.makePath()方法的一些代码示例,展示了ZKPaths.makePath()的具体用法。这些代码示例主要来
本文整理了Java中com.netflix.curator.utils.ZKPaths.getPathAndNode()方法的一些代码示例,展示了ZKPaths.getPathAndNode()的具体
本文整理了Java中org.apache.flink.shaded.curator.org.apache.curator.utils.ZKPaths.getNodeFromPath()方法的一些代码示
本文整理了Java中org.apache.flink.shaded.curator.org.apache.curator.utils.ZKPaths.deleteChildren()方法的一些代码示例
我是一名优秀的程序员,十分优秀!