Merge branch 'master' of github.com:hibernate/hibernate-core
This commit is contained in:
commit
0ffe3690ec
|
@ -50,12 +50,12 @@ public class CacheHelper {
|
|||
|
||||
public static void initInternalEvict(CacheAdapter cacheAdapter, AddressAdapter member) {
|
||||
EvictAll eKey = new EvictAll(member == null ? NoAddress.INSTANCE : member);
|
||||
cacheAdapter.withFlags(FlagAdapter.CACHE_MODE_LOCAL).put(eKey, Internal.INIT);
|
||||
cacheAdapter.withFlags(FlagAdapter.CACHE_MODE_LOCAL, FlagAdapter.SKIP_CACHE_LOAD).put(eKey, Internal.INIT);
|
||||
}
|
||||
|
||||
public static void sendEvictAllNotification(CacheAdapter cacheAdapter, AddressAdapter member) {
|
||||
EvictAll eKey = new EvictAll(member == null ? NoAddress.INSTANCE : member);
|
||||
cacheAdapter.put(eKey, Internal.EVICT);
|
||||
cacheAdapter.withFlags(FlagAdapter.SKIP_CACHE_LOAD).put(eKey, Internal.EVICT);
|
||||
}
|
||||
|
||||
public static boolean isEvictAllNotification(Object key) {
|
||||
|
|
|
@ -36,7 +36,8 @@ public enum FlagAdapter {
|
|||
CACHE_MODE_LOCAL,
|
||||
FORCE_ASYNCHRONOUS,
|
||||
FORCE_SYNCHRONOUS,
|
||||
SKIP_CACHE_STORE;
|
||||
SKIP_CACHE_STORE,
|
||||
SKIP_CACHE_LOAD;
|
||||
|
||||
Flag toFlag() {
|
||||
switch(this) {
|
||||
|
@ -50,6 +51,8 @@ public enum FlagAdapter {
|
|||
return Flag.FORCE_SYNCHRONOUS;
|
||||
case SKIP_CACHE_STORE:
|
||||
return Flag.SKIP_CACHE_STORE;
|
||||
case SKIP_CACHE_LOAD:
|
||||
return Flag.SKIP_CACHE_LOAD;
|
||||
default:
|
||||
throw new CacheException("Unmatched Infinispan flag " + this);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue