# HG changeset patch # User Severin Gehwolf # Date 1377185074 -7200 # Node ID b4637cac2cbce74577db04cec39b4f0864aa163c # Parent 19edbf121251c8cd41ec368a3fe3ee686b0c4dc8 Remove Key.isPartialCategoryKey property since it's not used any more. Reviewed-by: omajid Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-August/008006.html diff -r 19edbf121251 -r b4637cac2cbc host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/CpuStatDAO.java --- a/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/CpuStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/CpuStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,7 +47,7 @@ @Service public interface CpuStatDAO { - static Key> cpuLoadKey = new Key<>("perProcessorUsage", false); + static Key> cpuLoadKey = new Key<>("perProcessorUsage"); static final Category cpuStatCategory = new Category<>("cpu-stats", CpuStat.class, Key.AGENT_ID, Key.TIMESTAMP, cpuLoadKey); diff -r 19edbf121251 -r b4637cac2cbc host-cpu/common/src/test/java/com/redhat/thermostat/host/cpu/common/internal/CpuStatDAOTest.java --- a/host-cpu/common/src/test/java/com/redhat/thermostat/host/cpu/common/internal/CpuStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/host-cpu/common/src/test/java/com/redhat/thermostat/host/cpu/common/internal/CpuStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -71,9 +71,9 @@ public void testCategory() { assertEquals("cpu-stats", CpuStatDAO.cpuStatCategory.getName()); Collection> keys = CpuStatDAO.cpuStatCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("perProcessorUsage", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("perProcessorUsage"))); assertEquals(3, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/MemoryStatDAO.java --- a/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/MemoryStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/MemoryStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,13 +47,13 @@ @Service public interface MemoryStatDAO { - static Key memoryTotalKey = new Key<>("total", false); - static Key memoryFreeKey = new Key<>("free", false); - static Key memoryBuffersKey = new Key<>("buffers", false); - static Key memoryCachedKey = new Key<>("cached", false); - static Key memorySwapTotalKey = new Key<>("swapTotal", false); - static Key memorySwapFreeKey = new Key<>("swapFree", false); - static Key memoryCommitLimitKey = new Key<>("commitLimit", false); + static Key memoryTotalKey = new Key<>("total"); + static Key memoryFreeKey = new Key<>("free"); + static Key memoryBuffersKey = new Key<>("buffers"); + static Key memoryCachedKey = new Key<>("cached"); + static Key memorySwapTotalKey = new Key<>("swapTotal"); + static Key memorySwapFreeKey = new Key<>("swapFree"); + static Key memoryCommitLimitKey = new Key<>("commitLimit"); static final Category memoryStatCategory = new Category<>("memory-stats", MemoryStat.class, Key.AGENT_ID, Key.TIMESTAMP, memoryTotalKey, memoryFreeKey, memoryBuffersKey, diff -r 19edbf121251 -r b4637cac2cbc host-memory/common/src/test/java/com/redhat/thermostat/host/memory/common/internal/MemoryStatDAOTest.java --- a/host-memory/common/src/test/java/com/redhat/thermostat/host/memory/common/internal/MemoryStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/host-memory/common/src/test/java/com/redhat/thermostat/host/memory/common/internal/MemoryStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -77,15 +77,15 @@ public void testCategory() { assertEquals("memory-stats", MemoryStatDAO.memoryStatCategory.getName()); Collection> keys = MemoryStatDAO.memoryStatCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("total", false))); - assertTrue(keys.contains(new Key("free", false))); - assertTrue(keys.contains(new Key("buffers", false))); - assertTrue(keys.contains(new Key("cached", false))); - assertTrue(keys.contains(new Key("swapTotal", false))); - assertTrue(keys.contains(new Key("swapFree", false))); - assertTrue(keys.contains(new Key("commitLimit", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("total"))); + assertTrue(keys.contains(new Key("free"))); + assertTrue(keys.contains(new Key("buffers"))); + assertTrue(keys.contains(new Key("cached"))); + assertTrue(keys.contains(new Key("swapTotal"))); + assertTrue(keys.contains(new Key("swapFree"))); + assertTrue(keys.contains(new Key("commitLimit"))); assertEquals(9, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc numa/common/src/main/java/com/redhat/thermostat/numa/common/NumaDAO.java --- a/numa/common/src/main/java/com/redhat/thermostat/numa/common/NumaDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/numa/common/src/main/java/com/redhat/thermostat/numa/common/NumaDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -44,11 +44,11 @@ public interface NumaDAO { - static final Key nodeStats = new Key<>("nodeStats", false); + static final Key nodeStats = new Key<>("nodeStats"); static final Category numaStatCategory = new Category<>("numa-stat", NumaStat.class, Key.AGENT_ID, Key.TIMESTAMP, nodeStats); - static final Key hostNumNumaNodes = new Key<>("hostNumNumaNodes", false); + static final Key hostNumNumaNodes = new Key<>("hostNumNumaNodes"); static final Category numaHostCategory = new Category<>("numa-host-info", NumaHostInfo.class, Key.AGENT_ID, hostNumNumaNodes); diff -r 19edbf121251 -r b4637cac2cbc numa/common/src/test/java/com/redhat/thermostat/numa/common/NumaDAOTest.java --- a/numa/common/src/test/java/com/redhat/thermostat/numa/common/NumaDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/numa/common/src/test/java/com/redhat/thermostat/numa/common/NumaDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -38,8 +38,6 @@ package com.redhat.thermostat.numa.common; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -55,13 +53,8 @@ assertEquals(3, cat.getKeys().size()); assertEquals("agentId", cat.getKey("agentId").getName()); - assertTrue(cat.getKey("agentId").isPartialCategoryKey()); assertEquals("timeStamp", cat.getKey("timeStamp").getName()); - assertFalse(cat.getKey("timeStamp").isPartialCategoryKey()); - assertEquals("nodeStats", cat.getKey("nodeStats").getName()); - assertFalse(cat.getKey("nodeStats").isPartialCategoryKey()); - } } diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/core/Key.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/Key.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/core/Key.java Thu Aug 22 17:24:34 2013 +0200 @@ -36,20 +36,21 @@ package com.redhat.thermostat.storage.core; +import java.util.Objects; + /** - * A Key is used to refer to data in a {@link Chunk}. It may also be a partial key to the - * set of data represented by a {@link Chunk} in a category. + * Keys are attributes in {@link Category}s. Think of them as + * column names in a table if you're familiar with SQL. */ public class Key { // Keys used by most Categories. - public static final Key TIMESTAMP = new Key<>("timeStamp", false); - public static final Key AGENT_ID = new Key<>("agentId", true); - public static final Key VM_ID = new Key<>("vmId", true); - public static final Key ID = new Key<>("_id", false); + public static final Key TIMESTAMP = new Key<>("timeStamp"); + public static final Key AGENT_ID = new Key<>("agentId"); + public static final Key VM_ID = new Key<>("vmId"); + public static final Key ID = new Key<>("_id"); private String name; - private boolean isPartialCategoryKey; public Key() { // This is used only in de-serialization, e.g. using Gson, and therefore @@ -57,12 +58,11 @@ super(); } - public Key(String name, boolean isPartialCategoryKey) { + public Key(String name) { if (name == null || name.length() == 0) { throw new IllegalArgumentException("A Key must have a non-null name of length >= 1."); } this.name = name; - this.isPartialCategoryKey = isPartialCategoryKey; } public String getName() { @@ -73,15 +73,6 @@ this.name = name; } - public boolean isPartialCategoryKey() { - return isPartialCategoryKey; - } - - public void setPartialCategoryKey(boolean partialCategoryKey) { - this.isPartialCategoryKey = partialCategoryKey; - - } - @Override public boolean equals(Object o) { if (this == o) { @@ -91,16 +82,12 @@ return false; } Key e = (Key) o; - return (isPartialCategoryKey == e.isPartialCategoryKey()) && - name.equals(e.getName()); + return name.equals(e.getName()); } @Override public int hashCode() { - int hash = 1867; - hash = hash * 37 + (isPartialCategoryKey ? 0 : 1); - hash = hash * 37 + (name == null ? 0 : name.hashCode()); - return hash; + return Objects.hash(name); } @Override diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/dao/AgentInfoDAO.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/dao/AgentInfoDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/dao/AgentInfoDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -51,10 +51,10 @@ @Service public interface AgentInfoDAO extends Countable { - static final Key START_TIME_KEY = new Key<>("startTime", false); - static final Key STOP_TIME_KEY = new Key<>("stopTime", false); - static final Key ALIVE_KEY = new Key<>("alive", false); - static final Key CONFIG_LISTEN_ADDRESS = new Key<>("configListenAddress", false); + static final Key START_TIME_KEY = new Key<>("startTime"); + static final Key STOP_TIME_KEY = new Key<>("stopTime"); + static final Key ALIVE_KEY = new Key<>("alive"); + static final Key CONFIG_LISTEN_ADDRESS = new Key<>("configListenAddress"); static final Category CATEGORY = new Category<>("agent-config", AgentInformation.class, Key.AGENT_ID, diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/dao/BackendInfoDAO.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/dao/BackendInfoDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/dao/BackendInfoDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,12 +47,12 @@ @Service public interface BackendInfoDAO { - static final Key BACKEND_NAME = new Key<>("name", true); - static final Key BACKEND_DESCRIPTION = new Key<>("description", false); - static final Key IS_ACTIVE = new Key<>("active", false); - static final Key SHOULD_MONITOR_NEW_PROCESSES = new Key<>("observeNewJvm", false); - static final Key> PIDS_TO_MONITOR = new Key<>("pids", false); - static final Key ORDER_VALUE = new Key<>("orderValue", false); + static final Key BACKEND_NAME = new Key<>("name"); + static final Key BACKEND_DESCRIPTION = new Key<>("description"); + static final Key IS_ACTIVE = new Key<>("active"); + static final Key SHOULD_MONITOR_NEW_PROCESSES = new Key<>("observeNewJvm"); + static final Key> PIDS_TO_MONITOR = new Key<>("pids"); + static final Key ORDER_VALUE = new Key<>("orderValue"); static final Category CATEGORY = new Category<>("backend-info", BackendInformation.class, Key.AGENT_ID, diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/dao/HostInfoDAO.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/dao/HostInfoDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/dao/HostInfoDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -48,12 +48,12 @@ @Service public interface HostInfoDAO extends Countable { - static Key hostNameKey = new Key<>("hostname", true); - static Key osNameKey = new Key<>("osName", false); - static Key osKernelKey = new Key<>("osKernel", false); - static Key cpuCountKey = new Key<>("cpuCount", false); - static Key cpuModelKey = new Key<>("cpuModel", false); - static Key hostMemoryTotalKey = new Key<>("totalMemory", false); + static Key hostNameKey = new Key<>("hostname"); + static Key osNameKey = new Key<>("osName"); + static Key osKernelKey = new Key<>("osKernel"); + static Key cpuCountKey = new Key<>("cpuCount"); + static Key cpuModelKey = new Key<>("cpuModel"); + static Key hostMemoryTotalKey = new Key<>("totalMemory"); static final Category hostInfoCategory = new Category<>("host-info", HostInfo.class, Key.AGENT_ID, hostNameKey, osNameKey, osKernelKey, diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/dao/NetworkInterfaceInfoDAO.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/dao/NetworkInterfaceInfoDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/dao/NetworkInterfaceInfoDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,9 +47,9 @@ @Service public interface NetworkInterfaceInfoDAO { - static Key ifaceKey = new Key<>("interfaceName", true); - static Key ip4AddrKey = new Key<>("ip4Addr", false); - static Key ip6AddrKey = new Key<>("ip6Addr", false); + static Key ifaceKey = new Key<>("interfaceName"); + static Key ip4AddrKey = new Key<>("ip4Addr"); + static Key ip6AddrKey = new Key<>("ip6Addr"); static final Category networkInfoCategory = new Category<>("network-info", NetworkInterfaceInfo.class, Key.AGENT_ID, ifaceKey, ip4AddrKey, ip6AddrKey); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/dao/VmInfoDAO.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/dao/VmInfoDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/dao/VmInfoDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -51,22 +51,22 @@ @Service public interface VmInfoDAO extends Countable { - static final Key vmPidKey = new Key<>("vmPid", false); - static final Key runtimeVersionKey = new Key<>("javaVersion", false); - static final Key javaHomeKey = new Key<>("javaHome", false); - static final Key mainClassKey = new Key<>("mainClass", false); - static final Key commandLineKey = new Key<>("javaCommandLine", false); - static final Key vmArgumentsKey = new Key<>("vmArguments", false); - static final Key vmNameKey = new Key<>("vmName", false); - static final Key vmInfoKey = new Key<>("vmInfo", false); - static final Key vmVersionKey = new Key<>("vmVersion", false); - static final Key> propertiesKey = new Key<>("properties", false); - static final Key> environmentKey = new Key<>("environment", false); - static final Key> librariesKey = new Key<>("loadedNativeLibraries", false); - static final Key startTimeKey = new Key<>("startTimeStamp", false); - static final Key stopTimeKey = new Key<>("stopTimeStamp", false); - static final Key uidKey = new Key<>("uid", false); - static final Key usernameKey = new Key<>("username", false); + static final Key vmPidKey = new Key<>("vmPid"); + static final Key runtimeVersionKey = new Key<>("javaVersion"); + static final Key javaHomeKey = new Key<>("javaHome"); + static final Key mainClassKey = new Key<>("mainClass"); + static final Key commandLineKey = new Key<>("javaCommandLine"); + static final Key vmArgumentsKey = new Key<>("vmArguments"); + static final Key vmNameKey = new Key<>("vmName"); + static final Key vmInfoKey = new Key<>("vmInfo"); + static final Key vmVersionKey = new Key<>("vmVersion"); + static final Key> propertiesKey = new Key<>("properties"); + static final Key> environmentKey = new Key<>("environment"); + static final Key> librariesKey = new Key<>("loadedNativeLibraries"); + static final Key startTimeKey = new Key<>("startTimeStamp"); + static final Key stopTimeKey = new Key<>("stopTimeStamp"); + static final Key uidKey = new Key<>("uid"); + static final Key usernameKey = new Key<>("username"); static final Category vmInfoCategory = new Category<>("vm-info", VmInfo.class, Key.AGENT_ID, Key.VM_ID, vmPidKey, runtimeVersionKey, javaHomeKey, diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/SortMember.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/SortMember.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/SortMember.java Thu Aug 22 17:24:34 2013 +0200 @@ -92,7 +92,7 @@ } else { keyVal = (String)getSortKey(); } - Key sortKey = new Key<>(keyVal, false); + Key sortKey = new Key<>(keyVal); PatchedSortMember m = new PatchedSortMember(sortKey, getDirection()); return new PatchedSortMemberExpressionImpl(m); } catch (Exception e) { diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParser.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParser.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParser.java Thu Aug 22 17:24:34 2013 +0200 @@ -416,7 +416,7 @@ // statement context as the purpose of this was to ensure "type" // compatibility between Key <=> value comparisons. String stringTerm = getStringTerm(term); - Key key = new Key<>(stringTerm, false); + Key key = new Key<>(stringTerm); node.setValue(key); } else { Object typedValue = getTypedValue(term); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/TerminalNode.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/TerminalNode.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/internal/statement/TerminalNode.java Thu Aug 22 17:24:34 2013 +0200 @@ -81,7 +81,7 @@ } if (patch.isLHS()) { // LHS need to get patched to keys - Key valueKey = new Key<>((String)param.getValue(), false); + Key valueKey = new Key<>((String)param.getValue()); actualValue = valueKey; } else { actualValue = param.getValue(); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/core/CategoryTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/core/CategoryTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/core/CategoryTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -59,24 +59,24 @@ @Test public void testGetKey() { - Key key1 = new Key("key1", false); + Key key1 = new Key("key1"); Category category = new Category<>("testGetKey", TestObj.class, key1); assertEquals(key1, category.getKey("key1")); } @Test public void testGetNonExistingKey() { - Key key1 = new Key("key1", false); + Key key1 = new Key("key1"); Category category = new Category<>("testGetNonExistingKey", TestObj.class, key1); assertNull(category.getKey("key2")); } @Test public void testGetKeys() { - Key key1 = new Key("key1", false); - Key key2 = new Key("key2", false); - Key key3 = new Key("key3", false); - Key key4 = new Key("key4", false); + Key key1 = new Key("key1"); + Key key2 = new Key("key2"); + Key key3 = new Key("key3"); + Key key4 = new Key("key4"); Category category = new Category<>("testGetKeys", TestObj.class, key1, key2, key3, key4); assertEquals(4, category.getKeys().size()); assertTrue(category.getKeys().contains(key1)); @@ -87,9 +87,9 @@ @Test(expected=UnsupportedOperationException.class) public void verifyThatKeysAreUnmodifiable() { - Key key1 = new Key("key1", false); - Key key2 = new Key("key2", false); - Key key3 = new Key("key3", false); + Key key1 = new Key("key1"); + Key key2 = new Key("key2"); + Key key3 = new Key("key3"); Category category = new Category<>("verifyThatKeysAreUnmodifiable", TestObj.class, key1, key2, key3); Collection> keys = category.getKeys(); @@ -99,9 +99,9 @@ @Test public void testEquals() { - Key key1 = new Key("key1", false); - Key key2 = new Key("key2", false); - Key key3 = new Key("key3", false); + Key key1 = new Key("key1"); + Key key2 = new Key("key2"); + Key key3 = new Key("key3"); Category category = new Category<>("testEquals", TestObj.class, key1, key2, key3); assertTrue(category.equals(category)); assertFalse(category.equals(HostInfoDAO.hostInfoCategory)); @@ -109,7 +109,7 @@ @Test public void testHashCode() { - Key key1 = new Key("key1", false); + Key key1 = new Key("key1"); Category category = new Category<>("testHashCode", TestObj.class, key1); Map> keys = new HashMap<>(); keys.put(key1.getName(), key1); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/core/KeyTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/core/KeyTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/core/KeyTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -38,48 +38,40 @@ import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; - import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; import org.junit.Test; -import com.redhat.thermostat.storage.core.Key; - public class KeyTest { private static final String name1 = "key1"; private static final String name2 = "key2"; private static final String name3 = "key3"; - private static final Key key1 = new Key<>(name1, true); - private static final Key key2 = new Key<>(name2, true); - private static final Key key3 = new Key<>(name3, false); - private static final Key key4 = new Key<>(name1, false); - private static final Key key5 = new Key<>(name1, true); + private static final Key key1 = new Key<>(name1); + private static final Key key2 = new Key<>(name2); + private static final Key key3 = new Key<>(name3); + private static final Key key4 = new Key<>(name1); @Test public void verifyConstructorResultsInExpectedValues() { - Key key = new Key<>(name1, true); + Key key = new Key<>(name1); assertEquals(key.getName(), name1); - assertTrue(key.isPartialCategoryKey()); - key = new Key<>(name2, false); + key = new Key<>(name2); assertEquals(key.getName(), name2); - assertFalse(key.isPartialCategoryKey()); } @Test (expected=IllegalArgumentException.class) public void verifyConstructorThrowsExceptionOnNullName() { @SuppressWarnings("unused") - Key key = new Key<>(null, true); + Key key = new Key<>(null); } @Test (expected=IllegalArgumentException.class) public void verifyConstructorThrowsExceptionZeroLengthName() { @SuppressWarnings("unused") - Key key = new Key<>("", true); + Key key = new Key<>(""); } @Test @@ -97,19 +89,10 @@ } @Test - public void verifyIsPartialCategoryKeyReturnsCorrectValue() { - boolean value = key1.isPartialCategoryKey(); - assertTrue(value); - value = key3.isPartialCategoryKey(); - assertFalse(value); - } - - @Test public void verifyEqualsReturnsCorrectValue() { assertThat(key1, not(equalTo(key2))); assertThat(key1, not(equalTo(key3))); - assertThat(key1, not(equalTo(key4))); - assertThat(key1, equalTo(key5)); + assertThat(key1, equalTo(key4)); } @Test @@ -117,8 +100,8 @@ int key1hash1 = key1.hashCode(); int key1hash2 = key1.hashCode(); assertEquals(key1hash1, key1hash2); - int key5hash1 = key5.hashCode(); - assertEquals(key1hash1, key5hash1); + int key4hash1 = key4.hashCode(); + assertEquals(key1hash1, key4hash1); } @Test @@ -132,15 +115,5 @@ String string1 = key1.toString(); assertEquals(string1, "Key: key1"); } - - @Test - public void verifyAgentIdIsPartialkey() { - assertTrue(Key.AGENT_ID.isPartialCategoryKey()); - } - - @Test - public void verifyVmIdIsPartialkey() { - assertTrue(Key.VM_ID.isPartialCategoryKey()); - } } diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/HostInfoDAOTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/HostInfoDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/HostInfoDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -102,13 +102,13 @@ public void testCategory() { assertEquals("host-info", HostInfoDAO.hostInfoCategory.getName()); Collection> keys = HostInfoDAO.hostInfoCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("hostname", true))); - assertTrue(keys.contains(new Key("osName", false))); - assertTrue(keys.contains(new Key("osKernel", false))); - assertTrue(keys.contains(new Key("cpuModel", false))); - assertTrue(keys.contains(new Key("cpuCount", false))); - assertTrue(keys.contains(new Key("totalMemory", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("hostname"))); + assertTrue(keys.contains(new Key("osName"))); + assertTrue(keys.contains(new Key("osKernel"))); + assertTrue(keys.contains(new Key("cpuModel"))); + assertTrue(keys.contains(new Key("cpuCount"))); + assertTrue(keys.contains(new Key("totalMemory"))); assertEquals(7, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/NetworkInterfaceInfoDAOTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/NetworkInterfaceInfoDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/NetworkInterfaceInfoDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -77,10 +77,10 @@ assertEquals("network-info", NetworkInterfaceInfoDAO.networkInfoCategory.getName()); keys = NetworkInterfaceInfoDAO.networkInfoCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("interfaceName", true))); - assertTrue(keys.contains(new Key("ip4Addr", false))); - assertTrue(keys.contains(new Key("ip6Addr", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("interfaceName"))); + assertTrue(keys.contains(new Key("ip4Addr"))); + assertTrue(keys.contains(new Key("ip6Addr"))); assertEquals(4, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/VmInfoDAOTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/VmInfoDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/dao/VmInfoDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -128,24 +128,24 @@ public void testCategory() { assertEquals("vm-info", VmInfoDAO.vmInfoCategory.getName()); Collection> keys = VmInfoDAO.vmInfoCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("vmId", true))); - assertTrue(keys.contains(new Key("vmPid", false))); - assertTrue(keys.contains(new Key("javaVersion", false))); - assertTrue(keys.contains(new Key("javaHome", false))); - assertTrue(keys.contains(new Key("mainClass", false))); - assertTrue(keys.contains(new Key("javaCommandLine", false))); - assertTrue(keys.contains(new Key("vmArguments", false))); - assertTrue(keys.contains(new Key("vmName", false))); - assertTrue(keys.contains(new Key("vmInfo", false))); - assertTrue(keys.contains(new Key("vmVersion", false))); - assertTrue(keys.contains(new Key>("properties", false))); - assertTrue(keys.contains(new Key>("environment", false))); - assertTrue(keys.contains(new Key>("loadedNativeLibraries", false))); - assertTrue(keys.contains(new Key("startTimeStamp", false))); - assertTrue(keys.contains(new Key("stopTimeStamp", false))); - assertTrue(keys.contains(new Key("uid", false))); - assertTrue(keys.contains(new Key("username", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("vmId"))); + assertTrue(keys.contains(new Key("vmPid"))); + assertTrue(keys.contains(new Key("javaVersion"))); + assertTrue(keys.contains(new Key("javaHome"))); + assertTrue(keys.contains(new Key("mainClass"))); + assertTrue(keys.contains(new Key("javaCommandLine"))); + assertTrue(keys.contains(new Key("vmArguments"))); + assertTrue(keys.contains(new Key("vmName"))); + assertTrue(keys.contains(new Key("vmInfo"))); + assertTrue(keys.contains(new Key("vmVersion"))); + assertTrue(keys.contains(new Key>("properties"))); + assertTrue(keys.contains(new Key>("environment"))); + assertTrue(keys.contains(new Key>("loadedNativeLibraries"))); + assertTrue(keys.contains(new Key("startTimeStamp"))); + assertTrue(keys.contains(new Key("stopTimeStamp"))); + assertTrue(keys.contains(new Key("uid"))); + assertTrue(keys.contains(new Key("username"))); assertEquals(18, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/ParsedStatementImplTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/ParsedStatementImplTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/ParsedStatementImplTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -95,7 +95,7 @@ and.setLeftChild(leftEqual); and.setRightChild(rightEqual); TerminalNode a = new TerminalNode(leftEqual); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); TerminalNode b = new TerminalNode(leftEqual); UnfinishedValueNode patchB = new UnfinishedValueNode(); @@ -162,7 +162,7 @@ expn.getRoot().setValue(and); and.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(and); - a.setValue(new Key<>("a", false)); + a.setValue(new Key<>("a")); TerminalNode b = new TerminalNode(and); UnfinishedValueNode bPatch = new UnfinishedValueNode(); bPatch.setParameterIndex(0); @@ -190,7 +190,7 @@ assertTrue(root.getRightOperand() instanceof LiteralExpression); LiteralExpression leftLiteral1 = (LiteralExpression)root.getLeftOperand(); LiteralExpression rightLiteral1 = (LiteralExpression)root.getRightOperand(); - assertEquals(new Key<>("a", false), leftLiteral1.getValue()); + assertEquals(new Key<>("a"), leftLiteral1.getValue()); // this should have gotten patched to a "b" assertEquals(true, rightLiteral1.getValue()); // now do it again with a different value @@ -208,7 +208,7 @@ assertTrue(root.getRightOperand() instanceof LiteralExpression); leftLiteral1 = (LiteralExpression)root.getLeftOperand(); rightLiteral1 = (LiteralExpression)root.getRightOperand(); - assertEquals(new Key<>("a", false), leftLiteral1.getValue()); + assertEquals(new Key<>("a"), leftLiteral1.getValue()); assertEquals(false, rightLiteral1.getValue()); } @@ -258,7 +258,7 @@ assertTrue(root.getRightOperand() instanceof LiteralExpression); LiteralExpression leftLiteral1 = (LiteralExpression)root.getLeftOperand(); LiteralExpression rightLiteral1 = (LiteralExpression)root.getRightOperand(); - assertEquals(new Key<>("a", false), leftLiteral1.getValue()); + assertEquals(new Key<>("a"), leftLiteral1.getValue()); // this should have gotten patched to a "b" assertEquals(true, rightLiteral1.getValue()); // now do it again with a different value @@ -277,7 +277,7 @@ assertTrue(root.getRightOperand() instanceof LiteralExpression); leftLiteral1 = (LiteralExpression)root.getLeftOperand(); rightLiteral1 = (LiteralExpression)root.getRightOperand(); - assertEquals(new Key<>("a", false), leftLiteral1.getValue()); + assertEquals(new Key<>("a"), leftLiteral1.getValue()); assertEquals(false, rightLiteral1.getValue()); } @@ -338,12 +338,12 @@ assertEquals(2, actualSorts.size()); Pair, SortDirection> first = actualSorts.get(0); Key firstKeyActual = (Key)first.getFirst(); - Key expectedFirst = new Key<>("a", false); + Key expectedFirst = new Key<>("a"); assertEquals(expectedFirst, firstKeyActual); assertEquals(SortDirection.ASCENDING, first.getSecond()); Pair, SortDirection> second = actualSorts.get(1); Key secondKeyActual = (Key)second.getFirst(); - Key expectedSecond = new Key<>("b", false); + Key expectedSecond = new Key<>("b"); assertEquals(expectedSecond, secondKeyActual); assertEquals(SortDirection.DESCENDING, second.getSecond()); } @@ -367,7 +367,7 @@ and.setLeftChild(leftEqual); and.setRightChild(rightEqual); TerminalNode a = new TerminalNode(leftEqual); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); TerminalNode b = new TerminalNode(leftEqual); UnfinishedValueNode patchB = new UnfinishedValueNode(); @@ -377,7 +377,7 @@ leftEqual.setLeftChild(a); leftEqual.setRightChild(b); TerminalNode c = new TerminalNode(rightEqual); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); rightEqual.setLeftChild(c); TerminalNode d = new TerminalNode(rightEqual); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/PreparedStatementImplTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/PreparedStatementImplTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/PreparedStatementImplTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -107,7 +107,7 @@ preparedStatement.setString(0, "foo"); preparedStatement.executeQuery(); assertTrue(stmt.called); - LiteralExpression> o1 = new LiteralExpression<>(new Key("a", false)); + LiteralExpression> o1 = new LiteralExpression<>(new Key("a")); LiteralExpression o2 = new LiteralExpression<>("foo"); BinaryComparisonExpression binComp = new BinaryComparisonExpression<>( o1, BinaryComparisonOperator.EQUALS, o2); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParserTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParserTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/internal/statement/StatementDescriptorParserTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -261,7 +261,7 @@ expected.getRoot().setValue(notEquals); notEquals.setOperator(BinaryComparisonOperator.NOT_EQUAL_TO); TerminalNode a = new TerminalNode(notEquals); - a.setValue(new Key("a", false)); + a.setValue(new Key("a")); TerminalNode b = new TerminalNode(notEquals); b.setValue(bVal); notEquals.setLeftChild(a); @@ -288,7 +288,7 @@ expected.getRoot().setValue(notEquals); notEquals.setOperator(BinaryComparisonOperator.NOT_EQUAL_TO); TerminalNode a = new TerminalNode(notEquals); - a.setValue(new Key("a", false)); + a.setValue(new Key("a")); TerminalNode b = new TerminalNode(notEquals); b.setValue("b"); notEquals.setLeftChild(a); @@ -364,7 +364,7 @@ and2.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -374,7 +374,7 @@ and2.setRightChild(equality2); equality2.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -384,7 +384,7 @@ lessThan.setOperator(BinaryComparisonOperator.LESS_THAN); and1.setRightChild(lessThan); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); UnfinishedValueNode f = new UnfinishedValueNode(); @@ -426,7 +426,7 @@ and3.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -436,7 +436,7 @@ and3.setRightChild(equality2); equality2.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -446,7 +446,7 @@ lessThan.setOperator(BinaryComparisonOperator.LESS_THAN); and2.setRightChild(lessThan); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); TerminalNode f = new TerminalNode(lessThan); @@ -455,7 +455,7 @@ BinaryExpressionNode greaterOrEqual = new BinaryExpressionNode(and1); greaterOrEqual.setOperator(BinaryComparisonOperator.GREATER_THAN_OR_EQUAL_TO); TerminalNode g = new TerminalNode(greaterOrEqual); - Key gKey = new Key<>("g", false); + Key gKey = new Key<>("g"); g.setValue(gKey); greaterOrEqual.setLeftChild(g); TerminalNode h = new TerminalNode(greaterOrEqual); @@ -492,7 +492,7 @@ or2.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -502,7 +502,7 @@ or2.setRightChild(equality2); equality2.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -512,7 +512,7 @@ lessThan.setOperator(BinaryComparisonOperator.LESS_THAN); or1.setRightChild(lessThan); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); UnfinishedValueNode f = new UnfinishedValueNode(); @@ -555,7 +555,7 @@ or3.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -565,7 +565,7 @@ or3.setRightChild(equality2); equality2.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -575,7 +575,7 @@ lessThan.setOperator(BinaryComparisonOperator.LESS_THAN); or2.setRightChild(lessThan); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); TerminalNode f = new TerminalNode(lessThan); @@ -584,7 +584,7 @@ BinaryExpressionNode greaterOrEqual = new BinaryExpressionNode(or1); greaterOrEqual.setOperator(BinaryComparisonOperator.GREATER_THAN_OR_EQUAL_TO); TerminalNode g = new TerminalNode(greaterOrEqual); - Key gKey = new Key<>("g", false); + Key gKey = new Key<>("g"); g.setValue(gKey); greaterOrEqual.setLeftChild(g); TerminalNode h = new TerminalNode(greaterOrEqual); @@ -621,7 +621,7 @@ BinaryExpressionNode equality3 = new BinaryExpressionNode(and1); equality3.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode x = new TerminalNode(equality3); - x.setValue(new Key<>("x", false)); + x.setValue(new Key<>("x")); TerminalNode y = new TerminalNode(equality3); y.setValue("y"); equality3.setLeftChild(x); @@ -633,7 +633,7 @@ equality4.setOperator(BinaryComparisonOperator.EQUALS); and2.setRightChild(equality4); TerminalNode u = new TerminalNode(equality4); - u.setValue(new Key<>("u", false)); + u.setValue(new Key<>("u")); equality4.setLeftChild(u); TerminalNode w = new TerminalNode(equality4); w.setValue("w"); @@ -641,7 +641,7 @@ BinaryExpressionNode equality5 = new BinaryExpressionNode(and3); equality5.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode s = new TerminalNode(equality5); - s.setValue(new Key<>("s", false)); + s.setValue(new Key<>("s")); TerminalNode t = new TerminalNode(equality5); t.setValue("t"); equality5.setLeftChild(s); @@ -659,7 +659,7 @@ or1.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -669,7 +669,7 @@ equality2.setOperator(BinaryComparisonOperator.EQUALS); or1.setRightChild(equality2); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -680,7 +680,7 @@ or2.setRightChild(lessThan); or2.setLeftChild(or1); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); TerminalNode f = new TerminalNode(lessThan); @@ -689,7 +689,7 @@ BinaryExpressionNode greaterOrEqual = new BinaryExpressionNode(or3); greaterOrEqual.setOperator(BinaryComparisonOperator.GREATER_THAN_OR_EQUAL_TO); TerminalNode g = new TerminalNode(greaterOrEqual); - Key gKey = new Key<>("g", false); + Key gKey = new Key<>("g"); g.setValue(gKey); greaterOrEqual.setLeftChild(g); TerminalNode h = new TerminalNode(greaterOrEqual); @@ -730,7 +730,7 @@ not2.setValue(equality3); equality3.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode x = new TerminalNode(equality3); - x.setValue(new Key("x", false)); + x.setValue(new Key("x")); TerminalNode y = new TerminalNode(equality3); y.setValue("y"); equality3.setLeftChild(x); @@ -742,7 +742,7 @@ equality4.setOperator(BinaryComparisonOperator.EQUALS); and2.setRightChild(equality4); TerminalNode u = new TerminalNode(equality4); - u.setValue(new Key("u", false)); + u.setValue(new Key("u")); equality4.setLeftChild(u); TerminalNode w = new TerminalNode(equality4); w.setValue("w"); @@ -750,7 +750,7 @@ BinaryExpressionNode equality5 = new BinaryExpressionNode(and3); equality5.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode s = new TerminalNode(equality5); - s.setValue(new Key("s", false)); + s.setValue(new Key("s")); TerminalNode t = new TerminalNode(equality5); t.setValue("t"); equality5.setLeftChild(s); @@ -768,7 +768,7 @@ or1.setLeftChild(equality1); equality1.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality1); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality1.setLeftChild(a); TerminalNode b = new TerminalNode(equality1); @@ -780,7 +780,7 @@ not1.setValue(equality2); or1.setRightChild(not1); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality2.setLeftChild(c); TerminalNode d = new TerminalNode(equality2); @@ -791,7 +791,7 @@ or2.setRightChild(lessThan); or2.setLeftChild(or1); TerminalNode e = new TerminalNode(lessThan); - Key eKey = new Key<>("e", false); + Key eKey = new Key<>("e"); e.setValue(eKey); lessThan.setLeftChild(e); TerminalNode f = new TerminalNode(lessThan); @@ -800,7 +800,7 @@ BinaryExpressionNode greaterOrEqual = new BinaryExpressionNode(or3); greaterOrEqual.setOperator(BinaryComparisonOperator.GREATER_THAN_OR_EQUAL_TO); TerminalNode g = new TerminalNode(greaterOrEqual); - Key gKey = new Key<>("g", false); + Key gKey = new Key<>("g"); g.setValue(gKey); greaterOrEqual.setLeftChild(g); TerminalNode h = new TerminalNode(greaterOrEqual); @@ -847,7 +847,7 @@ BinaryExpressionNode unequality = new BinaryExpressionNode(and); unequality.setOperator(BinaryComparisonOperator.LESS_THAN); TerminalNode a = new TerminalNode(unequality); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); unequality.setLeftChild(a); TerminalNode b = new TerminalNode(unequality); @@ -857,7 +857,7 @@ BinaryExpressionNode equality = new BinaryExpressionNode(and); equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality.setLeftChild(c); UnfinishedValueNode patch1 = new UnfinishedValueNode(); @@ -872,7 +872,7 @@ not.setValue(greaterEqual); greaterEqual.setOperator(BinaryComparisonOperator.GREATER_THAN_OR_EQUAL_TO); TerminalNode x = new TerminalNode(greaterEqual); - Key xKey = new Key<>("x", false); + Key xKey = new Key<>("x"); x.setValue(xKey); greaterEqual.setLeftChild(x); UnfinishedValueNode patch2 = new UnfinishedValueNode(); @@ -918,7 +918,7 @@ BinaryExpressionNode unequality = new BinaryExpressionNode(or); unequality.setOperator(BinaryComparisonOperator.LESS_THAN); TerminalNode a = new TerminalNode(unequality); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); unequality.setLeftChild(a); TerminalNode b = new TerminalNode(unequality); @@ -928,7 +928,7 @@ BinaryExpressionNode equality = new BinaryExpressionNode(or); equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality); - Key cKey = new Key<>("c", false); + Key cKey = new Key<>("c"); c.setValue(cKey); equality.setLeftChild(c); UnfinishedValueNode patch1 = new UnfinishedValueNode(); @@ -967,7 +967,7 @@ unequality.setOperator(BinaryComparisonOperator.LESS_THAN); TerminalNode a = new TerminalNode(unequality); @SuppressWarnings("rawtypes") - Key aKey = new Key("a", false); + Key aKey = new Key("a"); a.setValue(aKey); unequality.setLeftChild(a); TerminalNode b = new TerminalNode(unequality); @@ -1000,7 +1000,7 @@ equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality); @SuppressWarnings("rawtypes") - Key aKey = new Key(Key.AGENT_ID.getName(), false); + Key aKey = new Key(Key.AGENT_ID.getName()); a.setValue(aKey); equality.setLeftChild(a); TerminalNode b = new TerminalNode(equality); @@ -1043,7 +1043,7 @@ BinaryExpressionNode equality = new BinaryExpressionNode(and); equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality); - Key aKey = new Key<>("a", false); + Key aKey = new Key<>("a"); a.setValue(aKey); equality.setLeftChild(a); TerminalNode b = new TerminalNode(equality); @@ -1053,7 +1053,7 @@ BinaryExpressionNode equality2 = new BinaryExpressionNode(and); equality2.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode c = new TerminalNode(equality2); - Key cKey = new Key<>(Key.AGENT_ID.getName(), false); + Key cKey = new Key<>(Key.AGENT_ID.getName()); c.setValue(cKey); equality2.setLeftChild(c); UnfinishedValueNode patch1 = new UnfinishedValueNode(); @@ -1111,7 +1111,7 @@ equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality); @SuppressWarnings("rawtypes") - Key aKey = new Key("a", false); + Key aKey = new Key("a"); a.setValue(aKey); equality.setLeftChild(a); UnfinishedValueNode unfinished = new UnfinishedValueNode(); @@ -1169,7 +1169,7 @@ TerminalNode rightCompTerm = new TerminalNode(comparison); TerminalNode leftCompTerm = new TerminalNode(comparison); @SuppressWarnings("rawtypes") - Key aKey = new Key("a", false); + Key aKey = new Key("a"); leftCompTerm.setValue(aKey); UnfinishedValueNode patch1 = new UnfinishedValueNode(); patch1.setParameterIndex(0); @@ -1221,7 +1221,7 @@ equality.setOperator(BinaryComparisonOperator.EQUALS); TerminalNode a = new TerminalNode(equality); @SuppressWarnings("rawtypes") - Key aKey = new Key("a", false); + Key aKey = new Key("a"); a.setValue(aKey); equality.setLeftChild(a); UnfinishedValueNode unfinished = new UnfinishedValueNode(); diff -r 19edbf121251 -r b4637cac2cbc storage/core/src/test/java/com/redhat/thermostat/storage/query/ExpressionFactoryTest.java --- a/storage/core/src/test/java/com/redhat/thermostat/storage/query/ExpressionFactoryTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/core/src/test/java/com/redhat/thermostat/storage/query/ExpressionFactoryTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -50,7 +50,7 @@ public class ExpressionFactoryTest { - private static final Key key = new Key<>("hello", true); + private static final Key key = new Key<>("hello"); private static final String VALUE = "world"; private static final Set VALUES = new HashSet<>(Arrays.asList("world", "worlds")); ExpressionFactory factory; diff -r 19edbf121251 -r b4637cac2cbc storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoExpressionParserTest.java --- a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoExpressionParserTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoExpressionParserTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -54,9 +54,9 @@ public class MongoExpressionParserTest { - private final Key KEY_1 = new Key<>("test", true); - private final Key KEY_2 = new Key<>("test2", true); - private final Key KEY_3 = new Key<>("key", true); + private final Key KEY_1 = new Key<>("test"); + private final Key KEY_2 = new Key<>("test2"); + private final Key KEY_3 = new Key<>("key"); private MongoExpressionParser parser; private ExpressionFactory factory; diff -r 19edbf121251 -r b4637cac2cbc storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoStorageTest.java --- a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoStorageTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/MongoStorageTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -157,11 +157,11 @@ } } - private static final Key key1 = new Key<>("key1", true); - private static final Key key2 = new Key<>("key2", true); - private static final Key key3 = new Key<>("key3", false); - private static final Key key4 = new Key<>("key4", false); - private static final Key key5 = new Key<>("key5", false); + private static final Key key1 = new Key<>("key1"); + private static final Key key2 = new Key<>("key2"); + private static final Key key3 = new Key<>("key3"); + private static final Key key4 = new Key<>("key4"); + private static final Key key5 = new Key<>("key5"); private static final Category testCategory = new Category<>("MongoStorageTest", TestClass.class, key1, key2, key3, key4, key5); private static final Category emptyTestCategory = new Category("MongoEmptyCategory", TestClass.class); diff -r 19edbf121251 -r b4637cac2cbc thread/collector/src/main/java/com/redhat/thermostat/thread/dao/ThreadDao.java --- a/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/ThreadDao.java Thu Aug 22 15:05:29 2013 +0200 +++ b/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/ThreadDao.java Thu Aug 22 17:24:34 2013 +0200 @@ -55,10 +55,10 @@ static final String THREAD_ALLOCATED_MEMORY = "thread-allocated-memory"; static final String SUPPORTED_FEATURES_LIST = "supportedFeaturesList"; - static final Key CPU_TIME_KEY = new Key(CPU_TIME, false); - static final Key CONTENTION_MONITOR_KEY = new Key(CONTENTION_MONITOR, false); - static final Key THREAD_ALLOCATED_MEMORY_KEY = new Key(THREAD_ALLOCATED_MEMORY, false); - static final Key> SUPPORTED_FEATURES_LIST_KEY = new Key>(SUPPORTED_FEATURES_LIST, false); + static final Key CPU_TIME_KEY = new Key(CPU_TIME); + static final Key CONTENTION_MONITOR_KEY = new Key(CONTENTION_MONITOR); + static final Key THREAD_ALLOCATED_MEMORY_KEY = new Key(THREAD_ALLOCATED_MEMORY); + static final Key> SUPPORTED_FEATURES_LIST_KEY = new Key>(SUPPORTED_FEATURES_LIST); static final Category THREAD_CAPABILITIES = new Category<>("vm-thread-capabilities", VMThreadCapabilities.class, Key.AGENT_ID, Key.VM_ID, @@ -69,9 +69,9 @@ void saveCapabilities(VMThreadCapabilities caps); static final String LIVE_THREADS = "currentLiveThreads"; - static final Key LIVE_THREADS_KEY = new Key(LIVE_THREADS, false); + static final Key LIVE_THREADS_KEY = new Key(LIVE_THREADS); static final String DAEMON_THREADS = "currentDaemonThreads"; - static final Key DAEMON_THREADS_KEY = new Key(DAEMON_THREADS, false); + static final Key DAEMON_THREADS_KEY = new Key(DAEMON_THREADS); static final Category THREAD_SUMMARY = new Category<>("vm-thread-summary", ThreadSummary.class, Key.AGENT_ID, Key.VM_ID, @@ -83,7 +83,7 @@ List loadSummary(VmRef ref, long since); static final String HARVESTING_DATA = "harvesting"; - static final Key HARVESTING_STATUS_KEY = new Key (HARVESTING_DATA, false); + static final Key HARVESTING_STATUS_KEY = new Key (HARVESTING_DATA); static final Category THREAD_HARVESTING_STATUS = new Category<>("vm-thread-harvesting", ThreadHarvestingStatus.class, Key.AGENT_ID, @@ -95,19 +95,19 @@ void saveHarvestingStatus(ThreadHarvestingStatus status); static final String THREAD_STATE = "threadState"; - static final Key THREAD_STATE_KEY = new Key(THREAD_STATE, false); + static final Key THREAD_STATE_KEY = new Key(THREAD_STATE); static final String THREAD_ID = "threadId"; - static final Key THREAD_ID_KEY = new Key(THREAD_ID, false); + static final Key THREAD_ID_KEY = new Key(THREAD_ID); static final String THREAD_NAME = "threadName"; - static final Key THREAD_NAME_KEY = new Key(THREAD_NAME, false); + static final Key THREAD_NAME_KEY = new Key(THREAD_NAME); static final String THREAD_CPU_TIME = "threadCpuTime"; - static final Key THREAD_CPU_TIME_KEY = new Key(THREAD_CPU_TIME, false); + static final Key THREAD_CPU_TIME_KEY = new Key(THREAD_CPU_TIME); static final String THREAD_USER_TIME = "threadUserTime"; - static final Key THREAD_USER_TIME_KEY = new Key(THREAD_USER_TIME, false); + static final Key THREAD_USER_TIME_KEY = new Key(THREAD_USER_TIME); static final String THREAD_BLOCKED_COUNT = "threadBlockedCount"; - static final Key THREAD_BLOCKED_COUNT_KEY = new Key(THREAD_BLOCKED_COUNT, false); + static final Key THREAD_BLOCKED_COUNT_KEY = new Key(THREAD_BLOCKED_COUNT); static final String THREAD_WAIT_COUNT = "threadWaitCount"; - static final Key THREAD_WAIT_COUNT_KEY = new Key(THREAD_WAIT_COUNT, false); + static final Key THREAD_WAIT_COUNT_KEY = new Key(THREAD_WAIT_COUNT); static final Category THREAD_INFO = new Category<>("vm-thread-info", ThreadInfoData.class, Key.AGENT_ID, Key.VM_ID, @@ -121,7 +121,7 @@ List loadThreadInfo(VmRef ref, long since); static final String DEADLOCK_DESCRIPTION = "description"; - static final Key DEADLOCK_DESCRIPTION_KEY = new Key<>(DEADLOCK_DESCRIPTION, false); + static final Key DEADLOCK_DESCRIPTION_KEY = new Key<>(DEADLOCK_DESCRIPTION); static final Category DEADLOCK_INFO = new Category<>("vm-deadlock-data", VmDeadLockData.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, DEADLOCK_DESCRIPTION_KEY); diff -r 19edbf121251 -r b4637cac2cbc vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/VmClassStatDAO.java --- a/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/VmClassStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/VmClassStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,7 +47,7 @@ @Service public interface VmClassStatDAO { - static final Key loadedClassesKey = new Key<>("loadedClasses", false); + static final Key loadedClassesKey = new Key<>("loadedClasses"); static final Category vmClassStatsCategory = new Category<>( "vm-class-stats", VmClassStat.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, loadedClassesKey); diff -r 19edbf121251 -r b4637cac2cbc vm-classstat/common/src/test/java/com/redhat/thermostat/vm/classstat/common/internal/VmClassStatDAOTest.java --- a/vm-classstat/common/src/test/java/com/redhat/thermostat/vm/classstat/common/internal/VmClassStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-classstat/common/src/test/java/com/redhat/thermostat/vm/classstat/common/internal/VmClassStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -73,10 +73,10 @@ public void testCategory() { assertEquals("vm-class-stats", VmClassStatDAO.vmClassStatsCategory.getName()); Collection> keys = VmClassStatDAO.vmClassStatsCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("vmId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("loadedClasses", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("vmId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("loadedClasses"))); assertEquals(4, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/VmCpuStatDAO.java --- a/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/VmCpuStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/VmCpuStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,7 +47,7 @@ @Service public interface VmCpuStatDAO { - static final Key vmCpuLoadKey = new Key<>("cpuLoad", false); + static final Key vmCpuLoadKey = new Key<>("cpuLoad"); static final Category vmCpuStatCategory = new Category<>("vm-cpu-stats", VmCpuStat.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, vmCpuLoadKey); diff -r 19edbf121251 -r b4637cac2cbc vm-cpu/common/src/test/java/com/redhat/thermostat/vm/cpu/common/internal/VmCpuStatDAOTest.java --- a/vm-cpu/common/src/test/java/com/redhat/thermostat/vm/cpu/common/internal/VmCpuStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-cpu/common/src/test/java/com/redhat/thermostat/vm/cpu/common/internal/VmCpuStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -81,10 +81,10 @@ public void testCategory() { assertEquals("vm-cpu-stats", VmCpuStatDAO.vmCpuStatCategory.getName()); Collection> keys = VmCpuStatDAO.vmCpuStatCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("vmId", true))); - assertTrue(keys.contains(new Key("cpuLoad", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("vmId"))); + assertTrue(keys.contains(new Key("cpuLoad"))); assertEquals(4, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/VmGcStatDAO.java --- a/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/VmGcStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/VmGcStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -47,10 +47,10 @@ @Service public interface VmGcStatDAO { - static final Key collectorKey = new Key<>("collectorName", false); - static final Key runCountKey = new Key<>("runCount", false); + static final Key collectorKey = new Key<>("collectorName"); + static final Key runCountKey = new Key<>("runCount"); /** time in microseconds */ - static final Key wallTimeKey = new Key<>("wallTime", false); + static final Key wallTimeKey = new Key<>("wallTime"); static final Category vmGcStatCategory = new Category<>("vm-gc-stats", VmGcStat.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, collectorKey, diff -r 19edbf121251 -r b4637cac2cbc vm-gc/common/src/test/java/com/redhat/thermostat/vm/gc/common/internal/VmGcStatDAOTest.java --- a/vm-gc/common/src/test/java/com/redhat/thermostat/vm/gc/common/internal/VmGcStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-gc/common/src/test/java/com/redhat/thermostat/vm/gc/common/internal/VmGcStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -75,12 +75,12 @@ public void testCategory() { assertEquals("vm-gc-stats", VmGcStatDAO.vmGcStatCategory.getName()); Collection> keys = VmGcStatDAO.vmGcStatCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("vmId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("collectorName", false))); - assertTrue(keys.contains(new Key("runCount", false))); - assertTrue(keys.contains(new Key("wallTime", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("vmId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("collectorName"))); + assertTrue(keys.contains(new Key("runCount"))); + assertTrue(keys.contains(new Key("wallTime"))); assertEquals(6, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDAO.java --- a/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -50,9 +50,9 @@ @Service public interface HeapDAO { - static final Key heapIdKey = new Key("heapId", false); - static final Key heapDumpIdKey = new Key("heapDumpId", false); - static final Key histogramIdKey = new Key("histogramId", false); + static final Key heapIdKey = new Key("heapId"); + static final Key heapDumpIdKey = new Key("heapDumpId"); + static final Key histogramIdKey = new Key("histogramId"); public static final Category heapInfoCategory = new Category<>("vm-heap-info", HeapInfo.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, heapIdKey, heapDumpIdKey, histogramIdKey); diff -r 19edbf121251 -r b4637cac2cbc vm-heap-analysis/common/src/test/java/com/redhat/thermostat/vm/heap/analysis/common/internal/HeapDAOTest.java --- a/vm-heap-analysis/common/src/test/java/com/redhat/thermostat/vm/heap/analysis/common/internal/HeapDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-heap-analysis/common/src/test/java/com/redhat/thermostat/vm/heap/analysis/common/internal/HeapDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -199,12 +199,12 @@ assertEquals("vm-heap-info", category.getName()); Collection> keys = category.getKeys(); assertEquals(6, keys.size()); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key<>("vmId", true))); - assertTrue(keys.contains(new Key<>("timeStamp", false))); - assertTrue(keys.contains(new Key<>("heapId", false))); - assertTrue(keys.contains(new Key<>("heapDumpId", false))); - assertTrue(keys.contains(new Key<>("histogramId", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key<>("vmId"))); + assertTrue(keys.contains(new Key<>("timeStamp"))); + assertTrue(keys.contains(new Key<>("heapId"))); + assertTrue(keys.contains(new Key<>("heapDumpId"))); + assertTrue(keys.contains(new Key<>("histogramId"))); } @Test diff -r 19edbf121251 -r b4637cac2cbc vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImpl.java --- a/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImpl.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImpl.java Thu Aug 22 17:24:34 2013 +0200 @@ -59,7 +59,7 @@ public class JmxNotificationDAOImpl implements JmxNotificationDAO { - private static final Key NOTIFICATIONS_ENABLED = new Key<>("notififcationsEnabled", false); + private static final Key NOTIFICATIONS_ENABLED = new Key<>("notififcationsEnabled"); private static final Logger logger = LoggingUtils.getLogger(JmxNotificationDAOImpl.class); static final Category NOTIFICATION_STATUS = @@ -69,9 +69,9 @@ // TODO: private static final Key IMPORTANCE = new Key<>("importance", // false); - private static final Key SOURCE_BACKEND = new Key<>("sourceBackend", false); - private static final Key SOURCE_DESCRPTION = new Key<>("sourceDescription", false); - private static final Key CONTENTS = new Key<>("contents", false); + private static final Key SOURCE_BACKEND = new Key<>("sourceBackend"); + private static final Key SOURCE_DESCRPTION = new Key<>("sourceDescription"); + private static final Key CONTENTS = new Key<>("contents"); static final Category NOTIFICATIONS = new Category<>("vm-jmx-notification", JmxNotification.class, diff -r 19edbf121251 -r b4637cac2cbc vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/VmMemoryStatDAO.java --- a/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/VmMemoryStatDAO.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/VmMemoryStatDAO.java Thu Aug 22 17:24:34 2013 +0200 @@ -48,7 +48,7 @@ @Service public interface VmMemoryStatDAO { - static final Key generationsKey = new Key<>("generations", false); + static final Key generationsKey = new Key<>("generations"); static final Category vmMemoryStatsCategory = new Category<>("vm-memory-stats", VmMemoryStat.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, generationsKey); diff -r 19edbf121251 -r b4637cac2cbc vm-memory/common/src/test/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOTest.java --- a/vm-memory/common/src/test/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/vm-memory/common/src/test/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -124,10 +124,10 @@ assertEquals("vm-memory-stats", VmMemoryStatDAO.vmMemoryStatsCategory.getName()); keys = VmMemoryStatDAO.vmMemoryStatsCategory.getKeys(); - assertTrue(keys.contains(new Key<>("agentId", true))); - assertTrue(keys.contains(new Key("vmId", true))); - assertTrue(keys.contains(new Key("timeStamp", false))); - assertTrue(keys.contains(new Key("generations", false))); + assertTrue(keys.contains(new Key<>("agentId"))); + assertTrue(keys.contains(new Key("vmId"))); + assertTrue(keys.contains(new Key("timeStamp"))); + assertTrue(keys.contains(new Key("generations"))); assertEquals(4, keys.size()); } diff -r 19edbf121251 -r b4637cac2cbc web/client/src/test/java/com/redhat/thermostat/web/client/internal/WebStorageTest.java --- a/web/client/src/test/java/com/redhat/thermostat/web/client/internal/WebStorageTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/web/client/src/test/java/com/redhat/thermostat/web/client/internal/WebStorageTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -155,8 +155,8 @@ @BeforeClass public static void setupCategory() { - key1 = new Key<>("property1", true); - key2 = new Key<>("property2", true); + key1 = new Key<>("property1"); + key2 = new Key<>("property2"); category = new Category<>("test", TestObj.class, key1); } diff -r 19edbf121251 -r b4637cac2cbc web/common/src/test/java/com/redhat/thermostat/web/common/ExpressionSerializerTest.java --- a/web/common/src/test/java/com/redhat/thermostat/web/common/ExpressionSerializerTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/web/common/src/test/java/com/redhat/thermostat/web/common/ExpressionSerializerTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -62,7 +62,7 @@ public class ExpressionSerializerTest { - private static final Key key = new Key<>("hello", true); + private static final Key key = new Key<>("hello"); private Gson gson; private static final class TestExpression implements Expression { diff -r 19edbf121251 -r b4637cac2cbc web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java --- a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java Thu Aug 22 15:05:29 2013 +0200 +++ b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java Thu Aug 22 17:24:34 2013 +0200 @@ -191,8 +191,8 @@ @BeforeClass public static void setupCategory() { - key1 = new Key<>("key1", true); - key2 = new Key<>("key2", false); + key1 = new Key<>("key1"); + key2 = new Key<>("key2"); category = new Category<>(categoryName, TestClass.class, key1, key2); }