use of org.apache.geode.internal.cache.NonLocalRegionEntry in project geode by apache.
the class GetEntryCommand method getValueAndIsObject.
@Override
public void getValueAndIsObject(Region p_region, Object key, Object callbackArg, ServerConnection servConn, Object[] result) {
Object data = null;
LocalRegion region = (LocalRegion) p_region;
Entry entry = region.getEntry(key);
if (logger.isDebugEnabled()) {
logger.debug("GetEntryCommand: for key: {} returning entry: {}", key, entry);
}
if (entry != null) {
EntrySnapshot snap = new EntrySnapshot();
NonLocalRegionEntry re = new NonLocalRegionEntry(entry, region);
snap.setRegionEntry(re);
snap.setRegion(region);
data = snap;
}
result[0] = data;
// isObject is true
result[1] = true;
}
use of org.apache.geode.internal.cache.NonLocalRegionEntry in project geode by apache.
the class GetEntry70 method getValueAndIsObject.
@Override
public Get70.Entry getValueAndIsObject(Region region, Object key, Object callbackArg, ServerConnection servConn) {
LocalRegion lregion = (LocalRegion) region;
Object data = null;
Region.Entry entry = region.getEntry(key);
if (logger.isDebugEnabled()) {
logger.debug("GetEntryCommand: for key: {} returning entry: {}", key, entry);
}
VersionTag tag = null;
if (entry != null) {
EntrySnapshot snap = new EntrySnapshot();
NonLocalRegionEntry re = new NonLocalRegionEntry(entry, lregion);
snap.setRegionEntry(re);
snap.setRegion(lregion);
data = snap;
tag = snap.getVersionTag();
}
Get70.Entry result = new Get70.Entry();
result.value = data;
result.isObject = true;
result.keyNotPresent = false;
result.versionTag = tag;
return result;
}
Aggregations