本文整理汇总了Java中org.onosproject.cpman.SystemInfo类的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo类的具体用法?Java SystemInfo怎么用?Java SystemInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SystemInfo类属于org.onosproject.cpman包,在下文中一共展示了SystemInfo类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSystemInfo
import org.onosproject.cpman.SystemInfo; //导入依赖的package包/类
/**
* Set system information only if it is empty.
*
* @param systemInfo reference object of system info
*/
public void setSystemInfo(SystemInfo systemInfo) {
synchronized (systemInfo) {
if (this.systemInfo == null) {
this.systemInfo = systemInfo;
} else {
log.warn("System information has already been set");
}
}
}
示例2: testSystemInfoPost
import org.onosproject.cpman.SystemInfo; //导入依赖的package包/类
@Test
public void testSystemInfoPost() {
basePostTest("system-info-post.json", PREFIX + "/system_info");
SystemInfo si = SystemInfoFactory.getInstance().getSystemInfo();
assertThat(si.cpuSpeed(), is(2048));
assertThat(si.coreCount(), is(6));
assertThat(si.cpuCount(), is(2));
assertThat(si.totalMemory(), is(4096));
}
示例3: getSystemInfo
import org.onosproject.cpman.SystemInfo; //导入依赖的package包/类
/**
* Returns system information.
*
* @return reference object of system info
*/
public SystemInfo getSystemInfo() {
synchronized (systemInfo) {
return this.systemInfo;
}
}