CachedManager
This commit is contained in:
@@ -26,12 +26,12 @@ public interface CachedManager extends Resourcable {
|
||||
/**
|
||||
* 默认的schema
|
||||
*/
|
||||
public static final String DEFAULT_SCHEMA = "cached-schema";
|
||||
public static final String CACHED_SCHEMA = "cached-schema";
|
||||
|
||||
/**
|
||||
* 默认的远程缓存订阅消息的管道名称
|
||||
*/
|
||||
public static final String CACHED_CHANNEL_TOPIC = "cached-channel-topic";
|
||||
public static final String CACHED_TOPIC = "cached-topic";
|
||||
|
||||
/**
|
||||
* 资源名称
|
||||
@@ -77,9 +77,9 @@ public interface CachedManager extends Resourcable {
|
||||
default String getChannelTopic() {
|
||||
String n = resourceName();
|
||||
if (n.isEmpty()) {
|
||||
return CACHED_CHANNEL_TOPIC;
|
||||
return CACHED_TOPIC;
|
||||
} else {
|
||||
return CACHED_CHANNEL_TOPIC + ':' + n;
|
||||
return CACHED_TOPIC + ':' + n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ import org.redkale.util.Utility;
|
||||
@ResourceType(CachedManager.class)
|
||||
public class CachedManagerService implements CachedManager, CachedActionFunc, Service {
|
||||
|
||||
public static final String CACHED_CHANNEL_TOPIC_PREFIX = "cached-update-channel";
|
||||
|
||||
protected final Logger logger = Logger.getLogger(getClass().getSimpleName());
|
||||
|
||||
protected Level logLevel = Level.FINER;
|
||||
@@ -120,7 +118,7 @@ public class CachedManagerService implements CachedManager, CachedActionFunc, Se
|
||||
}
|
||||
this.name = conf.getValue("name", "");
|
||||
this.enabled = conf.getBoolValue("enabled", true);
|
||||
this.schema = checkSchema(conf.getValue("schema", DEFAULT_SCHEMA));
|
||||
this.schema = checkSchema(conf.getValue("schema", CACHED_SCHEMA));
|
||||
if (this.enabled) {
|
||||
this.localSource.init(conf);
|
||||
String remoteSourceName = conf.getValue("remote", "");
|
||||
|
||||
Reference in New Issue
Block a user