protected void readData(AbstractShardDataTreeTransaction<?> transaction, ReadData message) {
    if (checkClosed(transaction)) {
      return;
    }

    final YangInstanceIdentifier path = message.getPath();
    Optional<NormalizedNode<?, ?>> optional = transaction.getSnapshot().readNode(path);
    ReadDataReply readDataReply = new ReadDataReply(optional.orNull(), message.getVersion());
    sender().tell(readDataReply.toSerializable(), self());
  }
示例#2
0
 @Override
 public void handleReceive(Object message) throws Exception {
   if (ReadData.SERIALIZABLE_CLASS.equals(message.getClass())) {
     readData(transaction, ReadData.fromSerializable(message));
   } else {
     super.handleReceive(message);
   }
 }