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.databroker.actors.dds;
10 import akka.actor.Props;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.controller.cluster.access.client.AbstractClientActor;
13 import org.opendaylight.controller.cluster.access.client.ClientActorContext;
14 import org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier;
15 import org.opendaylight.controller.cluster.access.concepts.FrontendType;
16 import org.opendaylight.controller.cluster.access.concepts.MemberName;
17 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
20 * A {@link AbstractClientActor} which acts as the point of contact for DistributedDataStore.
22 * @author Robert Varga
24 public final class DistributedDataStoreClientActor extends AbstractDataStoreClientActor {
25 private DistributedDataStoreClientActor(final FrontendIdentifier frontendId, final ActorUtils actorUtils) {
26 super(frontendId, actorUtils);
30 AbstractDataStoreClientBehavior initialBehavior(final ClientActorContext context, final ActorUtils actorUtils) {
31 return new DistributedDataStoreClientBehavior(context, actorUtils);
34 public static Props props(final @NonNull MemberName memberName, final @NonNull String storeName,
35 final @NonNull ActorUtils ctx) {
36 final String name = "datastore-" + storeName;
37 final FrontendIdentifier frontendId = FrontendIdentifier.create(memberName, FrontendType.forName(name));
38 return Props.create(DistributedDataStoreClientActor.class,
39 () -> new DistributedDataStoreClientActor(frontendId, ctx));