<version>1.11.0-SNAPSHOT</version>
<packaging>bundle</packaging>
- <properties>
- <!-- FIXME: Workaround for https://issues.apache.org/jira/browse/ARIES-1923 -->
- <maven.compiler.release>10</maven.compiler.release>
- </properties>
-
<dependencies>
<!-- Java -->
<dependency>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.sharding;
import com.google.common.annotations.Beta;
*/
@Beta
public interface DistributedShardFactory {
-
/**
* Register a new shard that is rooted at the desired prefix with replicas on the provided members.
* Note to register a shard without replicas you still need to provide at least one Member for the shard.
CompletionStage<DistributedShardRegistration>
createDistributedShard(DOMDataTreeIdentifier prefix, Collection<MemberName> replicaMembers)
throws DOMDataTreeShardingConflictException;
-
- /**
- * Registration of the CDS shard that allows you to remove the shard from the system by closing the registration.
- * This removal is done asynchronously.
- */
- interface DistributedShardRegistration {
-
- /**
- * Removes the shard from the system, this removal is done asynchronously, the future completes once the
- * backend shard is no longer present.
- */
- CompletionStage<Void> close();
- }
}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.cluster.sharding;
+
+import com.google.common.annotations.Beta;
+import java.util.concurrent.CompletionStage;
+
+/**
+ * Registration of the CDS shard that allows you to remove the shard from the system by closing the registration.
+ * This removal is done asynchronously.
+ */
+@Beta
+public interface DistributedShardRegistration {
+
+ /**
+ * Removes the shard from the system, this removal is done asynchronously, the future completes once the
+ * backend shard is no longer present.
+ */
+ CompletionStage<Void> close();
+}
import org.opendaylight.controller.cluster.datastore.utils.ClusterUtils;
import org.opendaylight.controller.cluster.raft.utils.InMemoryJournal;
import org.opendaylight.controller.cluster.raft.utils.InMemorySnapshotStore;
-import org.opendaylight.controller.cluster.sharding.DistributedShardFactory.DistributedShardRegistration;
import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.controller.cluster.dom.api.CDSShardAccess;
import org.opendaylight.controller.cluster.raft.utils.InMemoryJournal;
import org.opendaylight.controller.cluster.raft.utils.InMemorySnapshotStore;
-import org.opendaylight.controller.cluster.sharding.DistributedShardFactory.DistributedShardRegistration;
import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import java.util.stream.Collectors;
import org.opendaylight.controller.cluster.access.concepts.MemberName;
import org.opendaylight.controller.cluster.sharding.DistributedShardFactory;
-import org.opendaylight.controller.cluster.sharding.DistributedShardFactory.DistributedShardRegistration;
+import org.opendaylight.controller.cluster.sharding.DistributedShardRegistration;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.dom.api.DOMDataTreeCursorAwareTransaction;