This commit is contained in:
Redkale
2017-06-21 16:10:15 +08:00
parent 685a686ead
commit 0b87d9a261

View File

@@ -13,7 +13,7 @@ import java.util.function.Consumer;
import java.util.logging.*;
import javax.annotation.Resource;
import org.redkale.convert.json.*;
import org.redkale.net.sncp.Sncp;
import org.redkale.net.sncp.*;
import org.redkale.service.*;
import org.redkale.util.*;
@@ -155,6 +155,8 @@ public class CacheMemorySource<K extends Serializable, V extends Object> extends
}
}
if (remoteSource != null && !Sncp.isRemote(this)) {
SncpClient client = Sncp.getSncpClient((Service) remoteSource);
if (client != null && client.getRemoteGroupTransport() != null) {
super.runAsync(() -> {
try {
CompletableFuture<List<CacheEntry<K, Object>>> listFuture = remoteSource.queryListAsync();
@@ -173,6 +175,7 @@ public class CacheMemorySource<K extends Serializable, V extends Object> extends
});
}
}
}
@Override
public void close() throws Exception { //给Application 关闭时调用