@Override public Optional<NormalizedNode<?,?>> call() throws Exception {
Object response = actorContext
- .executeRemoteOperation(remoteTransaction, new ReadData(path),
+ .executeRemoteOperation(remoteTransaction, new ReadData(path).toSerializable(),
ActorContext.ASK_DURATION);
- if(response instanceof ReadDataReply){
- ReadDataReply reply = (ReadDataReply) response;
+ if(response.getClass().equals(ReadDataReply.SERIALIZABLE_CLASS)){
+ ReadDataReply reply = ReadDataReply.fromSerializable(schemaContext,path, response);
if(reply.getNormalizedNode() == null){
return Optional.absent();
}
@Override
public void write(InstanceIdentifier path, NormalizedNode<?, ?> data) {
final ActorSelection remoteTransaction = remoteTransactionFromIdentifier(path);
- remoteTransaction.tell(new WriteData(path, data, schemaContext), null);
+ remoteTransaction.tell(new WriteData(path, data, schemaContext).toSerializable(), null);
}
@Override
public void merge(InstanceIdentifier path, NormalizedNode<?, ?> data) {
final ActorSelection remoteTransaction = remoteTransactionFromIdentifier(path);
- remoteTransaction.tell(new MergeData(path, data, schemaContext), null);
+ remoteTransaction.tell(new MergeData(path, data, schemaContext).toSerializable(), null);
}
@Override