com.nepxion.discovery.console.redis.adapter.RedisConfigAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-console-starter-redis Show documentation
Show all versions of discovery-console-starter-redis Show documentation
Nepxion Discovery is an enhancement for Spring Cloud Discovery
package com.nepxion.discovery.console.redis.adapter;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @author JiKai Sun
* @version 1.0
*/
import org.springframework.beans.factory.annotation.Autowired;
import com.nepxion.discovery.common.entity.ConfigType;
import com.nepxion.discovery.common.redis.operation.RedisOperation;
import com.nepxion.discovery.console.adapter.ConfigAdapter;
public class RedisConfigAdapter implements ConfigAdapter {
@Autowired
private RedisOperation redisOperation;
@Override
public boolean updateConfig(String group, String serviceId, String config) throws Exception {
return redisOperation.publishConfig(group, serviceId, config);
}
@Override
public boolean clearConfig(String group, String serviceId) throws Exception {
return redisOperation.removeConfig(group, serviceId);
}
@Override
public String getConfig(String group, String serviceId) throws Exception {
return redisOperation.getConfig(group, serviceId);
}
@Override
public ConfigType getConfigType() {
return ConfigType.REDIS;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy