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 akka.actor.ActorRef;
11 import com.google.common.base.Preconditions;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.concepts.Mutable;
16 * Common, externally-invisible superclass of contexts associated with a {@link AbstractClientActor}. End users pass
17 * this object via opaque {@link ClientActorContext}.
19 * @author Robert Varga
21 abstract class AbstractClientActorContext implements Mutable {
22 private final String persistenceId;
23 private final ActorRef self;
25 AbstractClientActorContext(@Nonnull final ActorRef self, @Nonnull final String persistenceId) {
26 this.persistenceId = Preconditions.checkNotNull(persistenceId);
27 this.self = Preconditions.checkNotNull(self);
30 // TODO: rename this to logContext()
32 final String persistenceId() {
37 public final ActorRef self() {