Mercurial > hg > release > thermostat-1.2
changeset 1332:2130033fd660
Index all Keys used with a SORT
Reviewed-by: jerboaa
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-November/008735.html
line wrap: on
line diff
--- a/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/CpuStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/CpuStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.host.cpu.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -50,7 +51,7 @@ static Key<List<Double>> cpuLoadKey = new Key<>("perProcessorUsage"); static final Category<CpuStat> cpuStatCategory = new Category<>("cpu-stats", CpuStat.class, - Key.AGENT_ID, Key.TIMESTAMP, cpuLoadKey); + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.TIMESTAMP, cpuLoadKey), Arrays.<Key<?>>asList(Key.TIMESTAMP)); List<CpuStat> getLatestCpuStats(HostRef ref, long since);
--- a/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/MemoryStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/MemoryStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.host.memory.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -56,8 +57,9 @@ static Key<Long> memoryCommitLimitKey = new Key<>("commitLimit"); static final Category<MemoryStat> memoryStatCategory = new Category<>("memory-stats", MemoryStat.class, - Key.AGENT_ID, Key.TIMESTAMP, memoryTotalKey, memoryFreeKey, memoryBuffersKey, - memoryCachedKey, memorySwapTotalKey, memorySwapFreeKey, memoryCommitLimitKey); + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.TIMESTAMP, memoryTotalKey, memoryFreeKey, memoryBuffersKey, + memoryCachedKey, memorySwapTotalKey, memorySwapFreeKey, memoryCommitLimitKey), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); public List<MemoryStat> getLatestMemoryStats(HostRef ref, long since);
--- a/numa/common/src/main/java/com/redhat/thermostat/numa/common/NumaDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/numa/common/src/main/java/com/redhat/thermostat/numa/common/NumaDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.numa.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.storage.core.Category; @@ -46,7 +47,9 @@ static final Key<NumaNodeStat[]> nodeStats = new Key<>("nodeStats"); - static final Category<NumaStat> numaStatCategory = new Category<>("numa-stat", NumaStat.class, Key.AGENT_ID, Key.TIMESTAMP, nodeStats); + static final Category<NumaStat> numaStatCategory = new Category<>("numa-stat", NumaStat.class, + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.TIMESTAMP, nodeStats), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); static final Key<Integer> hostNumNumaNodes = new Key<>("numNumaNodes");
--- a/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/ThreadDao.java Mon Nov 18 14:15:56 2013 -0500 +++ b/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/ThreadDao.java Mon Nov 18 14:15:57 2013 -0500 @@ -72,9 +72,14 @@ static final Key<Long> LIVE_THREADS_KEY = new Key<Long>("currentLiveThreads"); static final Key<Long> DAEMON_THREADS_KEY = new Key<Long>("currentDaemonThreads"); static final Category<ThreadSummary> THREAD_SUMMARY = - new Category<>("vm-thread-summary", ThreadSummary.class, Key.AGENT_ID, Key.VM_ID, - Key.TIMESTAMP, - LIVE_THREADS_KEY, DAEMON_THREADS_KEY); + new Category<>("vm-thread-summary", ThreadSummary.class, + Arrays.<Key<?>>asList( + Key.AGENT_ID, + Key.VM_ID, + Key.TIMESTAMP, + LIVE_THREADS_KEY, + DAEMON_THREADS_KEY), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); /* * vm-thread-harvesting schema @@ -82,10 +87,12 @@ static final Key<Boolean> HARVESTING_STATUS_KEY = new Key<Boolean>("harvesting"); static final Category<ThreadHarvestingStatus> THREAD_HARVESTING_STATUS = new Category<>("vm-thread-harvesting", ThreadHarvestingStatus.class, - Key.AGENT_ID, - Key.VM_ID, - Key.TIMESTAMP, - HARVESTING_STATUS_KEY); + Arrays.<Key<?>>asList( + Key.AGENT_ID, + Key.VM_ID, + Key.TIMESTAMP, + HARVESTING_STATUS_KEY), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); /* * vm-thread-info schema
--- a/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/VmClassStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/VmClassStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.vm.classstat.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -50,7 +51,8 @@ static final Key<Long> loadedClassesKey = new Key<>("loadedClasses"); static final Category<VmClassStat> vmClassStatsCategory = new Category<>( - "vm-class-stats", VmClassStat.class, Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, loadedClassesKey); + "vm-class-stats", VmClassStat.class, + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, loadedClassesKey), Arrays.<Key<?>>asList(Key.TIMESTAMP)); public List<VmClassStat> getLatestClassStats(VmRef ref, long since);
--- a/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/VmCpuStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/VmCpuStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.vm.cpu.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -50,7 +51,7 @@ static final Key<Double> vmCpuLoadKey = new Key<>("cpuLoad"); static final Category<VmCpuStat> vmCpuStatCategory = new Category<>("vm-cpu-stats", VmCpuStat.class, - Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, vmCpuLoadKey); + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, vmCpuLoadKey), Arrays.<Key<?>>asList(Key.TIMESTAMP)); public abstract List<VmCpuStat> getLatestVmCpuStats(VmRef ref, long since);
--- a/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/VmGcStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/VmGcStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.vm.gc.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -53,8 +54,8 @@ static final Key<Long> wallTimeKey = new Key<>("wallTime"); static final Category<VmGcStat> vmGcStatCategory = new Category<>("vm-gc-stats", VmGcStat.class, - Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, collectorKey, - runCountKey, wallTimeKey); + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, collectorKey, runCountKey, wallTimeKey), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); public List<VmGcStat> getLatestVmGcStats(VmRef ref, long since);
--- a/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImpl.java Mon Nov 18 14:15:56 2013 -0500 +++ b/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImpl.java Mon Nov 18 14:15:57 2013 -0500 @@ -37,6 +37,7 @@ package com.redhat.thermostat.vm.jmx.common.internal; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.logging.Level; @@ -71,8 +72,14 @@ static final Category<JmxNotification> NOTIFICATIONS = new Category<>("vm-jmx-notification", JmxNotification.class, - Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, - SOURCE_BACKEND, SOURCE_DETAILS, CONTENTS); + Arrays.<Key<?>>asList( + Key.AGENT_ID, + Key.VM_ID, + Key.TIMESTAMP, + SOURCE_BACKEND, + SOURCE_DETAILS, + CONTENTS), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); // Query descriptors
--- a/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/VmMemoryStatDAO.java Mon Nov 18 14:15:56 2013 -0500 +++ b/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/VmMemoryStatDAO.java Mon Nov 18 14:15:57 2013 -0500 @@ -36,6 +36,7 @@ package com.redhat.thermostat.vm.memory.common; +import java.util.Arrays; import java.util.List; import com.redhat.thermostat.annotations.Service; @@ -51,7 +52,8 @@ static final Key<Generation[]> generationsKey = new Key<>("generations"); static final Category<VmMemoryStat> vmMemoryStatsCategory = new Category<>("vm-memory-stats", VmMemoryStat.class, - Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, generationsKey); + Arrays.<Key<?>>asList(Key.AGENT_ID, Key.VM_ID, Key.TIMESTAMP, generationsKey), + Arrays.<Key<?>>asList(Key.TIMESTAMP)); public VmMemoryStat getLatestMemoryStat(VmRef ref);