Aaron Kruglikov

Changing distributed primitive names to follow standard naming.

Change-Id: I9065584ced95fbb0a1920ba60226548729276cab
Showing 6 changed files with 62 additions and 62 deletions
......@@ -37,9 +37,9 @@ import java.util.Set;
/**
* AsyncConsistentMultimap state machine commands.
*/
public final class AsyncConsistentMultimapCommands {
public final class AtomixConsistentMultimapCommands {
private AsyncConsistentMultimapCommands() {
private AtomixConsistentMultimapCommands() {
}
/**
......
......@@ -31,39 +31,39 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Clear;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsEntry;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsKey;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsValue;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Entries;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Get;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.IsEmpty;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.KeySet;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Keys;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.MultiRemove;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Put;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.RemoveAll;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Replace;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Size;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Values;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Clear;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsEntry;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsKey;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsValue;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Entries;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Get;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.IsEmpty;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.KeySet;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Keys;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.MultiRemove;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Put;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.RemoveAll;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Replace;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Size;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Values;
/**
* Set based implementation of the {@link AsyncConsistentMultimap}.
* <p>
* Note: this implementation does not allow null entries or duplicate entries.
*/
@ResourceTypeInfo(id = -153, factory = AsyncConsistentSetMultimapFactory.class)
public class AsyncConsistentSetMultimap
extends AbstractResource<AsyncConsistentSetMultimap>
@ResourceTypeInfo(id = -153, factory = AtomixConsistentSetMultimapFactory.class)
public class AtomixConsistentSetMultimap
extends AbstractResource<AtomixConsistentSetMultimap>
implements AsyncConsistentMultimap<String, byte[]> {
public AsyncConsistentSetMultimap(CopycatClient client,
Properties properties) {
public AtomixConsistentSetMultimap(CopycatClient client,
Properties properties) {
super(client, properties);
}
@Override
public CompletableFuture<AsyncConsistentSetMultimap> open() {
public CompletableFuture<AtomixConsistentSetMultimap> open() {
return super.open();
//TODO
}
......
......@@ -24,23 +24,23 @@ import io.atomix.resource.ResourceStateMachine;
import java.util.Properties;
/**
* {@link AsyncConsistentSetMultimap} resource factory.
* {@link AtomixConsistentSetMultimap} resource factory.
*/
public class AsyncConsistentSetMultimapFactory implements
ResourceFactory<AsyncConsistentSetMultimap> {
public class AtomixConsistentSetMultimapFactory implements
ResourceFactory<AtomixConsistentSetMultimap> {
@Override
public SerializableTypeResolver createSerializableTypeResolver() {
return new AsyncConsistentMultimapCommands.TypeResolver();
return new AtomixConsistentMultimapCommands.TypeResolver();
}
@Override
public ResourceStateMachine createStateMachine(Properties config) {
return new AsyncConsistentSetMultimapState(config);
return new AtomixConsistentSetMultimapState(config);
}
@Override
public AsyncConsistentSetMultimap createInstance(CopycatClient client,
Properties properties) {
return new AsyncConsistentSetMultimap(client, properties);
public AtomixConsistentSetMultimap createInstance(CopycatClient client,
Properties properties) {
return new AtomixConsistentSetMultimap(client, properties);
}
}
......
......@@ -53,28 +53,28 @@ import java.util.function.Supplier;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Clear;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsEntry;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsKey;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.ContainsValue;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Entries;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Get;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.IsEmpty;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.KeySet;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Keys;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.MultiRemove;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.MultimapCommand;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Put;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.RemoveAll;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Replace;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Size;
import static org.onosproject.store.primitives.resources.impl.AsyncConsistentMultimapCommands.Values;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Clear;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsEntry;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsKey;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.ContainsValue;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Entries;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Get;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.IsEmpty;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.KeySet;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Keys;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.MultiRemove;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.MultimapCommand;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Put;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.RemoveAll;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Replace;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Size;
import static org.onosproject.store.primitives.resources.impl.AtomixConsistentMultimapCommands.Values;
import static org.slf4j.LoggerFactory.getLogger;
/**
* State Machine for {@link AsyncConsistentSetMultimap} resource.
* State Machine for {@link AtomixConsistentSetMultimap} resource.
*/
public class AsyncConsistentSetMultimapState extends ResourceStateMachine
public class AtomixConsistentSetMultimapState extends ResourceStateMachine
implements SessionListener, Snapshottable {
private final Logger log = getLogger(getClass());
......@@ -82,7 +82,7 @@ public class AsyncConsistentSetMultimapState extends ResourceStateMachine
//TODO Add listener map here
private final Map<String, MapEntryValue> backingMap = Maps.newHashMap();
public AsyncConsistentSetMultimapState(Properties properties) {
public AtomixConsistentSetMultimapState(Properties properties) {
super(properties);
}
......
......@@ -39,9 +39,9 @@ import java.util.Set;
* {@link org.onosproject.store.service.AsyncConsistentTreeMap} Resource
* state machine operations.
*/
public final class AsyncConsistentTreeMapCommands {
public final class AtomixConsistentTreeMapCommands {
private AsyncConsistentTreeMapCommands() {
private AtomixConsistentTreeMapCommands() {
}
/**
......
......@@ -37,9 +37,9 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Tests the {@link AsyncConsistentSetMultimap}.
* Tests the {@link AtomixConsistentSetMultimap}.
*/
public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
public class AtomixConsistentSetMultimapTest extends AtomixTestBase {
private final String keyOne = "hello";
private final String keyTwo = "goodbye";
private final String keyThree = "foo";
......@@ -67,7 +67,7 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
@Override
protected ResourceType resourceType() {
return new ResourceType(AsyncConsistentSetMultimap.class);
return new ResourceType(AtomixConsistentSetMultimap.class);
}
/**
......@@ -76,7 +76,7 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
*/
@Test
public void testSize() throws Throwable {
AsyncConsistentSetMultimap map = createResource("testOneMap");
AtomixConsistentSetMultimap map = createResource("testOneMap");
//Simplest operation case
map.isEmpty().thenAccept(result -> assertTrue(result));
map.put(keyOne, valueOne).
......@@ -125,7 +125,7 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
*/
@Test
public void containsTest() throws Throwable {
AsyncConsistentSetMultimap map = createResource("testTwoMap");
AtomixConsistentSetMultimap map = createResource("testTwoMap");
//Populate the maps
allKeys.forEach(key -> {
......@@ -184,7 +184,7 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
*/
@Test
public void addAndRemoveTest() throws Exception {
AsyncConsistentSetMultimap map = createResource("testThreeMap");
AtomixConsistentSetMultimap map = createResource("testThreeMap");
//Test single put
allKeys.forEach(key -> {
......@@ -318,7 +318,7 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
*/
@Test
public void testAccessors() throws Exception {
AsyncConsistentSetMultimap map = createResource("testFourMap");
AtomixConsistentSetMultimap map = createResource("testFourMap");
//Populate for full map behavior tests
allKeys.forEach(key -> {
......@@ -401,10 +401,10 @@ public class AsyncConsistentSetMultimapTest extends AtomixTestBase {
map.destroy().join();
}
private AsyncConsistentSetMultimap createResource(String mapName) {
private AtomixConsistentSetMultimap createResource(String mapName) {
try {
AsyncConsistentSetMultimap map = createAtomixClient().
getResource("mapName", AsyncConsistentSetMultimap.class)
AtomixConsistentSetMultimap map = createAtomixClient().
getResource("mapName", AtomixConsistentSetMultimap.class)
.join();
return map;
} catch (Throwable e) {
......