Removes deprecated withPartitionsDisabled method
Change-Id: I9a39c0584d0e5d62d5719639598c5cc25bcb8e2f
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
index eaaeefc..9fd7a7a 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
@@ -17,7 +17,6 @@
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.Serializer;
@@ -32,10 +31,6 @@
description = "Get a value associated with a specific key in a transactional map")
public class TransactionalMapTestGetCommand extends AbstractShellCommand {
- @Option(name = "-i", aliases = "--inMemory", description = "use in memory map?",
- required = false, multiValued = false)
- private boolean inMemory = false;
-
@Argument(index = 0, name = "key",
description = "Key to get the value of",
required = true, multiValued = false)
@@ -49,11 +44,7 @@
protected void execute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
- if (inMemory) {
- context = storageService.transactionContextBuilder().withPartitionsDisabled().build();
- } else {
- context = storageService.transactionContextBuilder().build();
- }
+ context = storageService.transactionContextBuilder().build();
context.begin();
try {
map = context.getTransactionalMap(mapName, serializer);
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
index 88d9e00..1e42c91 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
@@ -17,7 +17,6 @@
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.Serializer;
@@ -32,10 +31,6 @@
description = "Put a value into a transactional map")
public class TransactionalMapTestPutCommand extends AbstractShellCommand {
- @Option(name = "-i", aliases = "--inMemory", description = "use in memory map?",
- required = false, multiValued = false)
- private boolean inMemory = false;
-
@Argument(index = 0, name = "numKeys",
description = "Number of keys to put the value into",
required = true, multiValued = false)
@@ -55,11 +50,7 @@
protected void execute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
- if (inMemory) {
- context = storageService.transactionContextBuilder().withPartitionsDisabled().build();
- } else {
- context = storageService.transactionContextBuilder().build();
- }
+ context = storageService.transactionContextBuilder().build();
context.begin();
try {
map = context.getTransactionalMap(mapName, serializer);
diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveBuilder.java b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveBuilder.java
index 350f58b..a122125 100644
--- a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveBuilder.java
+++ b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveBuilder.java
@@ -74,18 +74,6 @@
}
/**
- * Creates this primitive on a special partition that comprises of all members in the cluster.
- * @deprecated usage of this method is discouraged for most common scenarios. Eventually it will be replaced
- * with a better alternative that does not exposes low level details. Until then avoid using this method.
- * @return this builder
- */
- @Deprecated
- public B withPartitionsDisabled() {
- this.partitionsDisabled = true;
- return (B) this;
- }
-
- /**
* Disables recording usage stats for this primitive.
* @deprecated usage of this method is discouraged for most common scenarios.
* @return this builder
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
index de4123b..725e3ca 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
@@ -232,7 +232,6 @@
availableDevices = storageService.<DeviceId>setBuilder()
.withName("onos-online-devices")
.withSerializer(Serializer.using(KryoNamespaces.API))
- .withPartitionsDisabled()
.withRelaxedReadConsistency()
.build()
.asDistributedSet();
diff --git a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
index 30a4de1..450875e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
@@ -198,7 +198,6 @@
private PacketRequestTracker() {
requests = storageService.<TrafficSelector, Set<PacketRequest>>consistentMapBuilder()
.withName("onos-packet-requests")
- .withPartitionsDisabled()
.withSerializer(Serializer.using(KryoNamespaces.API))
.build();
}
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedSetBuilder.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedSetBuilder.java
index 74e6318..c17f91d 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedSetBuilder.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedSetBuilder.java
@@ -77,12 +77,6 @@
}
@Override
- public DistributedSetBuilder<E> withPartitionsDisabled() {
- mapBuilder.withPartitionsDisabled();
- return this;
- }
-
- @Override
public DistributedSetBuilder<E> withMeteringDisabled() {
metering = false;
return this;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/resource/impl/DistributedLabelResourceStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/resource/impl/DistributedLabelResourceStore.java
index 740b6aa..fda0d83 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/resource/impl/DistributedLabelResourceStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/resource/impl/DistributedLabelResourceStore.java
@@ -116,8 +116,7 @@
resourcePool = storageService
.<DeviceId, LabelResourcePool>consistentMapBuilder()
- .withName(POOL_MAP_NAME).withSerializer(SERIALIZER)
- .withPartitionsDisabled().build();
+ .withName(POOL_MAP_NAME).withSerializer(SERIALIZER).build();
messageHandlingExecutor = Executors
.newFixedThreadPool(MESSAGE_HANDLER_THREAD_POOL_SIZE,
groupedThreads("onos/store/flow",