Remove duplicate junit dependency
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / EntityOwnershipShardPropsCreator.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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.datastore.entityownership;
9
10 import akka.actor.Props;
11 import java.util.Map;
12 import org.opendaylight.controller.cluster.datastore.DatastoreContext;
13 import org.opendaylight.controller.cluster.datastore.ShardPropsCreator;
14 import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier;
15 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
16
17 /**
18  * Implementation of ShardPropsCreator that creates a Props instance for the EntityOwnershipShard class.
19  *
20  * @author Thomas Pantelis
21  */
22 class EntityOwnershipShardPropsCreator implements ShardPropsCreator {
23     private final String localMemberName;
24
25     EntityOwnershipShardPropsCreator(String localMemberName) {
26         this.localMemberName = localMemberName;
27     }
28
29     @Override
30     public Props newProps(ShardIdentifier shardId, Map<String, String> peerAddresses,
31             DatastoreContext datastoreContext, SchemaContext schemaContext) {
32         return EntityOwnershipShard.props(shardId, peerAddresses, datastoreContext, schemaContext, localMemberName);
33     }
34 }