|
|
|
@ -48,6 +48,7 @@ public class BaseRegion implements TransactionalDataRegion, GeneralDataRegion {
|
|
|
|
|
|
|
|
|
|
int ttl;
|
|
|
|
|
int maxIdle;
|
|
|
|
|
int size;
|
|
|
|
|
boolean fallback;
|
|
|
|
|
volatile boolean fallbackMode;
|
|
|
|
|
|
|
|
|
@ -60,7 +61,8 @@ public class BaseRegion implements TransactionalDataRegion, GeneralDataRegion {
|
|
|
|
|
|
|
|
|
|
String maxEntries = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_ENTRIES_SUFFIX);
|
|
|
|
|
if (maxEntries != null) {
|
|
|
|
|
mapCache.setMaxSize(Integer.valueOf(maxEntries));
|
|
|
|
|
size = Integer.valueOf(maxEntries);
|
|
|
|
|
mapCache.setMaxSize(size);
|
|
|
|
|
}
|
|
|
|
|
String timeToLive = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.TTL_SUFFIX);
|
|
|
|
|
if (timeToLive != null) {
|
|
|
|
@ -180,6 +182,9 @@ public class BaseRegion implements TransactionalDataRegion, GeneralDataRegion {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
if (maxIdle == 0 && size == 0) {
|
|
|
|
|
return mapCache.getWithTTLOnly(key);
|
|
|
|
|
}
|
|
|
|
|
return mapCache.get(key);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
if (fallback) {
|
|
|
|
|