Hi,
Trying to access particular field on a server side function, and want to
utilize “Provides single field access of serialized data, without full
deserialization - supported also for OQL querying.” But if I do
PartitionRegionHelper.getLocalDataForContext(context).get("key1"), that give me
the whole object, how do I use pdxserilizer to get a partial constructed
object—basically access a single field?
public class Simple {
String id;
String name;
Timestamp time;
}
public class GetTimeStampFunction implements Function{
@Override
public void execute(FunctionContext fc) {
if(! (fc instanceof RegionFunctionContext)){
throw new FunctionException("This is a data aware function, and has
to be called using FunctionService.onRegion.");
}
RegionFunctionContext context = (RegionFunctionContext)fc;
Object value =
PartitionRegionHelper.getLocalDataForContext(context).get("key1"); //need
partial object with only id and time fields populated.
context.getResultSender().lastResult(value);
}
----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may
contain information that is privileged, confidential and/or proprietary and
subject to important terms and conditions available at
http://www.bankofamerica.com/emaildisclaimer. If you are not the intended
recipient, please delete this message.