BUG-5280: handle TransactionPurgeRequest replay
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / SimpleDataStoreClientBehavior.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.databroker.actors.dds;
9
10 import org.opendaylight.controller.cluster.access.client.ClientActorContext;
11 import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13
14 /**
15  * {@link AbstractDataStoreClientBehavior} which connects to a single shard only.
16  *
17  * @author Robert Varga
18  */
19 final class SimpleDataStoreClientBehavior extends AbstractDataStoreClientBehavior {
20     // Pre-boxed instance
21     private static final Long ZERO = Long.valueOf(0);
22
23     private SimpleDataStoreClientBehavior(final ClientActorContext context,
24             final SimpleShardBackendResolver resolver) {
25         super(context, resolver);
26     }
27
28     SimpleDataStoreClientBehavior(final ClientActorContext context, final ActorContext actorContext,
29             final String shardName) {
30         this(context, new SimpleShardBackendResolver(context.getIdentifier(), actorContext, shardName));
31     }
32
33     @Override
34     Long resolveShardForPath(final YangInstanceIdentifier path) {
35         return ZERO;
36     }
37 }