HHH-1706 Support evictAll for LOCAL second level cache environments

This commit is contained in:
Galder Zamarreño 2012-02-02 09:50:10 +01:00
parent 2b356317ce
commit 5eee526234
1 changed files with 6 additions and 2 deletions

View File

@ -219,8 +219,12 @@ public class CacheAdapterImpl implements CacheAdapter {
@Override @Override
public void broadcastEvictAll() { public void broadcastEvictAll() {
EvictAllCommand cmd = cacheCmdInitializer.buildEvictAllCommand(cache.getName()); RpcManager rpcManager = cache.getRpcManager();
cache.getRpcManager().broadcastRpcCommand(cmd, isSync); if (rpcManager != null) {
// Only broadcast evict all if it's clustered
EvictAllCommand cmd = cacheCmdInitializer.buildEvictAllCommand(cache.getName());
rpcManager.broadcastRpcCommand(cmd, isSync);
}
} }
@Override @Override