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 java.util.stream.Stream;
11 import org.opendaylight.controller.cluster.access.client.ClientActorContext;
12 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 * {@link AbstractDataStoreClientBehavior} which connects to a single shard only.
18 * @author Robert Varga
20 final class SimpleDataStoreClientBehavior extends AbstractDataStoreClientBehavior {
22 private static final Long ZERO = 0L;
24 private SimpleDataStoreClientBehavior(final ClientActorContext context,
25 final SimpleShardBackendResolver resolver) {
26 super(context, resolver);
29 SimpleDataStoreClientBehavior(final ClientActorContext context, final ActorUtils actorUtils,
30 final String shardName) {
31 this(context, new SimpleShardBackendResolver(context.getIdentifier(), actorUtils, shardName));
35 Long resolveShardForPath(final YangInstanceIdentifier path) {
40 Stream<Long> resolveAllShards() {
41 return Stream.of(ZERO);