2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.controller.eos.akka.owner.supervisor.command;
10 import static java.util.Objects.requireNonNull;
12 import akka.actor.Address;
13 import com.google.common.base.MoreObjects;
15 import org.eclipse.jdt.annotation.NonNull;
17 public abstract class InternalClusterEvent extends OwnerSupervisorCommand {
18 private final @NonNull Set<String> roles;
19 private final @NonNull Address address;
21 InternalClusterEvent(final Address address, final Set<String> roles) {
22 this.address = requireNonNull(address);
23 this.roles = Set.copyOf(roles);
26 public final @NonNull Address getAddress() {
30 public final @NonNull Set<String> getRoles() {
35 public final String toString() {
36 return MoreObjects.toStringHelper(this).add("address", address).add("roles", roles).toString();