// this operation returns the object in data format except
// it is got from near-cache and near-cache memory format is object.
protected Object getInternal(Data key) {
// todo: why does this method not make use of getAsyncInternal and just do a get on it?
// now there is a lot of duplication.
final MapConfig mapConfig = getMapConfig();
final boolean nearCacheEnabled = mapConfig.isNearCacheEnabled();
if (nearCacheEnabled) {
final Object fromNearCache = getFromNearCache(key);
if (fromNearCache != null) {
if (isCachedAsNullInNearCache(fromNearCache)) {
return null;
}
return fromNearCache;
}
}
// todo action for read-backup true is not well tested.
if (mapConfig.isReadBackupData()) {
final Object fromBackup = readBackupDataOrNull(key);
if (fromBackup != null) {
return fromBackup;
}
}