Madan Jampani
Committed by Gerrit Code Review

Removes deprecated withPartitionsDisabled method

Change-Id: I9a39c0584d0e5d62d5719639598c5cc25bcb8e2f
......@@ -17,7 +17,6 @@ package org.onosproject.distributedprimitives.cli;
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 @@ import org.onosproject.store.service.TransactionalMap;
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 @@ public class TransactionalMapTestGetCommand extends AbstractShellCommand {
protected void execute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
if (inMemory) {
context = storageService.transactionContextBuilder().withPartitionsDisabled().build();
} else {
context = storageService.transactionContextBuilder().build();
}
context.begin();
try {
map = context.getTransactionalMap(mapName, serializer);
......
......@@ -17,7 +17,6 @@ package org.onosproject.distributedprimitives.cli;
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 @@ import org.onosproject.store.service.TransactionalMap;
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 @@ public class TransactionalMapTestPutCommand extends AbstractShellCommand {
protected void execute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
if (inMemory) {
context = storageService.transactionContextBuilder().withPartitionsDisabled().build();
} else {
context = storageService.transactionContextBuilder().build();
}
context.begin();
try {
map = context.getTransactionalMap(mapName, serializer);
......
......@@ -74,18 +74,6 @@ public abstract class DistributedPrimitiveBuilder<B extends DistributedPrimitive
}
/**
* 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
......
......@@ -232,7 +232,6 @@ public class ECDeviceStore
availableDevices = storageService.<DeviceId>setBuilder()
.withName("onos-online-devices")
.withSerializer(Serializer.using(KryoNamespaces.API))
.withPartitionsDisabled()
.withRelaxedReadConsistency()
.build()
.asDistributedSet();
......
......@@ -198,7 +198,6 @@ public class DistributedPacketStore
private PacketRequestTracker() {
requests = storageService.<TrafficSelector, Set<PacketRequest>>consistentMapBuilder()
.withName("onos-packet-requests")
.withPartitionsDisabled()
.withSerializer(Serializer.using(KryoNamespaces.API))
.build();
}
......
......@@ -77,12 +77,6 @@ public class DefaultDistributedSetBuilder<E> extends DistributedSetBuilder<E> {
}
@Override
public DistributedSetBuilder<E> withPartitionsDisabled() {
mapBuilder.withPartitionsDisabled();
return this;
}
@Override
public DistributedSetBuilder<E> withMeteringDisabled() {
metering = false;
return this;
......
......@@ -116,8 +116,7 @@ public class DistributedLabelResourceStore
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",
......