org.diirt.datasource.sys.UsedMemoryChannelHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasource-sys Show documentation
Show all versions of datasource-sys Show documentation
Support for system information data source.
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
package org.diirt.datasource.sys;
import static org.diirt.vtype.ValueFactory.*;
/**
*
* @author carcassi
*/
class UsedMemoryChannelHandler extends SystemChannelHandler {
public UsedMemoryChannelHandler(String channelName) {
super(channelName);
}
@Override
protected Object createValue() {
return newVDouble(bytesToMebiByte(Runtime.getRuntime().totalMemory()), alarmNone(), timeNow(), memoryDisplay);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy