Remove JournalWriter.getLastEntry()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / TestDistributedDataStore.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.datastore;
9
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;
17
18 @Deprecated(since = "7.0.0", forRemoval = true)
19 public class TestDistributedDataStore extends DistributedDataStore implements LocalShardStore {
20
21     public TestDistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
22                                     final Configuration configuration,
23                                     final DatastoreContextFactory datastoreContextFactory,
24                                     final DatastoreSnapshot restoreFromSnapshot) {
25         super(actorSystem, cluster, configuration, datastoreContextFactory, restoreFromSnapshot);
26     }
27
28     TestDistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
29         super(actorUtils, identifier);
30     }
31
32     @Override
33     protected AbstractShardManagerCreator<?> getShardManagerCreator() {
34         return new TestShardManager.TestShardManagerCreator();
35     }
36
37     @Override
38     public TestShardManager.GetLocalShardsReply getLocalShards() {
39         TestShardManager.GetLocalShardsReply reply =
40             (TestShardManager.GetLocalShardsReply) getActorUtils()
41                 .executeOperation(getActorUtils().getShardManager(), TestShardManager.GetLocalShards.INSTANCE);
42
43         return reply;
44     }
45 }