Add an actor for entity rpc execution.
[controller.git] / opendaylight / md-sal / eos-dom-akka / src / main / java / org / opendaylight / controller / eos / akka / owner / supervisor / command / GetEntityBackendReply.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.eos.akka.owner.supervisor.command;
9
10 import com.google.common.collect.ImmutableSet;
11 import java.io.Serializable;
12 import java.util.Set;
13 import org.eclipse.jdt.annotation.Nullable;
14
15 public final class GetEntityBackendReply extends OwnerSupervisorReply implements Serializable {
16     private static final long serialVersionUID = 1L;
17
18     private final ImmutableSet<String> candidates;
19     private final String owner;
20
21     public GetEntityBackendReply(final @Nullable String owner, final @Nullable Set<String> candidates) {
22         this.owner = owner;
23         this.candidates = candidates == null ? ImmutableSet.of() : ImmutableSet.copyOf(candidates);
24     }
25
26     public ImmutableSet<String> getCandidates() {
27         return candidates;
28     }
29
30     public String getOwner() {
31         return owner;
32     }
33 }