This commit is contained in:
@@ -75,11 +75,6 @@ public class CacheMemorySource<V extends Object> extends AbstractService impleme
|
|||||||
this.needStore = !flag;
|
this.needStore = !flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSupportQueryList() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(AnyValue conf) {
|
public void init(AnyValue conf) {
|
||||||
if (this.convert == null) this.convert = this.defaultConvert;
|
if (this.convert == null) this.convert = this.defaultConvert;
|
||||||
@@ -160,7 +155,7 @@ public class CacheMemorySource<V extends Object> extends AbstractService impleme
|
|||||||
}
|
}
|
||||||
if (remoteSource != null && !Sncp.isRemote(this)) {
|
if (remoteSource != null && !Sncp.isRemote(this)) {
|
||||||
SncpClient client = Sncp.getSncpClient((Service) remoteSource);
|
SncpClient client = Sncp.getSncpClient((Service) remoteSource);
|
||||||
if (client != null && client.getRemoteGroupTransport() != null && remoteSource.isSupportQueryList()) {
|
if (client != null && client.getRemoteGroupTransport() != null) {
|
||||||
super.runAsync(() -> {
|
super.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
CompletableFuture<List<CacheEntry<Object>>> listFuture = remoteSource.queryListAsync();
|
CompletableFuture<List<CacheEntry<Object>>> listFuture = remoteSource.queryListAsync();
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ public interface CacheSource<V extends Object> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//是否支持queryList 或 queryListAsync 方法
|
|
||||||
default boolean isSupportQueryList() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean exists(final String key);
|
public boolean exists(final String key);
|
||||||
|
|
||||||
public V get(final String key);
|
public V get(final String key);
|
||||||
@@ -112,11 +107,6 @@ public interface CacheSource<V extends Object> {
|
|||||||
return CompletableFuture.completedFuture(isOpen());
|
return CompletableFuture.completedFuture(isOpen());
|
||||||
}
|
}
|
||||||
|
|
||||||
//是否支持queryList 或 queryListAsync 方法
|
|
||||||
default CompletableFuture<Boolean> isSupportQueryListAsync() {
|
|
||||||
return CompletableFuture.completedFuture(isSupportQueryList());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static enum CacheEntryType {
|
public static enum CacheEntryType {
|
||||||
OBJECT, SET, LIST;
|
OBJECT, SET, LIST;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user