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.datastore.actors.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 this
17 * 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(final @Nonnull ActorRef self, final @Nonnull String persistenceId) {
26 this.persistenceId = Preconditions.checkNotNull(persistenceId);
27 this.self = Preconditions.checkNotNull(self);
30 final @Nonnull String persistenceId() {
34 final @Nonnull ActorRef self() {