8a96a76dd09f0e9faa6008388f5d8b43808a4034
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / messages / CandidateRemoved.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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
9 package org.opendaylight.controller.cluster.datastore.entityownership.messages;
10
11 import java.util.Collection;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13
14 /**
15  * Message sent when a candidate is removed for an entity.
16  *
17  * @author Moiz Raja
18  * @author Thomas Pantelis
19  */
20 public class CandidateRemoved {
21     private final YangInstanceIdentifier entityPath;
22     private final String removedCandidate;
23     private final Collection<String> remainingCandidates;
24
25     public CandidateRemoved(YangInstanceIdentifier entityPath, String removedCandidate, Collection<String> remainingCandidates) {
26         this.entityPath = entityPath;
27         this.removedCandidate = removedCandidate;
28         this.remainingCandidates = remainingCandidates;
29     }
30
31     public YangInstanceIdentifier getEntityPath() {
32         return entityPath;
33     }
34
35     public String getRemovedCandidate() {
36         return removedCandidate;
37     }
38
39     public Collection<String> getRemainingCandidates() {
40         return remainingCandidates;
41     }
42
43     @Override
44     public String toString() {
45         return "CandidateRemoved [entityPath=" + entityPath + ", removedCandidate=" + removedCandidate
46                 + ", remainingCandidates=" + remainingCandidates + "]";
47     }
48 }