import akka.actor.ActorSelection;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.ReadOnlyDataTree;
/**
* Local message DTO that contains information about the primary shard.
public class PrimaryShardInfo {
private final ActorSelection primaryShardActor;
private final short primaryShardVersion;
- private final DataTree localShardDataTree;
+ private final ReadOnlyDataTree localShardDataTree;
public PrimaryShardInfo(@NonNull ActorSelection primaryShardActor, short primaryShardVersion,
- @NonNull DataTree localShardDataTree) {
+ @NonNull ReadOnlyDataTree localShardDataTree) {
this.primaryShardActor = requireNonNull(primaryShardActor);
this.primaryShardVersion = primaryShardVersion;
this.localShardDataTree = requireNonNull(localShardDataTree);
* Returns an Optional whose value contains the primary shard's DataTree if the primary shard is local
* to the caller. Otherwise the Optional value is absent.
*/
- public @NonNull Optional<DataTree> getLocalShardDataTree() {
+ public @NonNull Optional<ReadOnlyDataTree> getLocalShardDataTree() {
return Optional.ofNullable(localShardDataTree);
}
}