}
setLastSampleTs(getJmxUri(), startdate);
JmxSampleResult newRes = new JmxSampleResult();
MemUsageJmxClient c = new MemUsageJmxClient();
c.setUrl(getJmxUri());
MemoryData d = c.getData();
newRes.setSampleLabel("jmx");
long mem = byte2Kbyte(d.getUsedNonHeap());
if (HEAP_MEM.equals(getJmxMemType())) {
// transform in Kb by default (mem is returned in bytes)
mem = byte2Kbyte(d.getUsedHeap());
}
newRes.setMemType(getJmxMemType());
newRes.setValue(mem);
newRes.setJmxUri(getJmxUri());
newRes.setSamplerData(Long.toString(mem));