2 * Copyright (c) 2019 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.cluster.datastore;
10 import akka.actor.ActorSystem;
11 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
12 import org.opendaylight.controller.cluster.datastore.config.Configuration;
13 import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot;
14 import org.opendaylight.controller.cluster.datastore.shardmanager.AbstractShardManagerCreator;
15 import org.opendaylight.controller.cluster.datastore.shardmanager.TestShardManager;
16 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
18 public class TestDistributedDataStore extends DistributedDataStore implements LocalShardStore {
20 public TestDistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
21 final Configuration configuration,
22 final DatastoreContextFactory datastoreContextFactory,
23 final DatastoreSnapshot restoreFromSnapshot) {
24 super(actorSystem, cluster, configuration, datastoreContextFactory, restoreFromSnapshot);
27 TestDistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
28 super(actorUtils, identifier);
32 protected AbstractShardManagerCreator<?> getShardManagerCreator() {
33 return new TestShardManager.TestShardManagerCreator();
37 public TestShardManager.GetLocalShardsReply getLocalShards() {
38 TestShardManager.GetLocalShardsReply reply =
39 (TestShardManager.GetLocalShardsReply) getActorUtils()
40 .executeOperation(getActorUtils().getShardManager(), TestShardManager.GetLocalShards.INSTANCE);