2 * Copyright (c) 2016 Cisco Systems, Inc. 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.cluster.access.client;
10 import static java.util.Objects.requireNonNull;
12 import akka.actor.ActorRef;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.concepts.Mutable;
17 * Common, externally-invisible superclass of contexts associated with a {@link AbstractClientActor}. End users pass
18 * this object via opaque {@link ClientActorContext}.
20 * @author Robert Varga
22 abstract class AbstractClientActorContext implements Mutable {
23 private final @NonNull String persistenceId;
24 private final @NonNull ActorRef self;
26 AbstractClientActorContext(final @NonNull ActorRef self, final @NonNull String persistenceId) {
27 this.persistenceId = requireNonNull(persistenceId);
28 this.self = requireNonNull(self);
31 // TODO: rename this to logContext()
32 final @NonNull String persistenceId() {
36 public final @NonNull ActorRef self() {