use of org.olat.restapi.system.vo.MemoryPoolVO in project OpenOLAT by OpenOLAT.
the class MemoryWebService method createMemoryPools.
private MemoryPoolVO[] createMemoryPools() {
List<MemoryPoolMXBean> memoryPool = ManagementFactory.getMemoryPoolMXBeans();
MemoryPoolVO[] voes = new MemoryPoolVO[memoryPool.size()];
int count = 0;
for (MemoryPoolMXBean bean : memoryPool) {
if (bean.isValid()) {
voes[count++] = new MemoryPoolVO(bean);
}
}
return voes;
}
use of org.olat.restapi.system.vo.MemoryPoolVO in project OpenOLAT by OpenOLAT.
the class MemoryWebService method getMemoryPools.
@GET
@Path("pools")
@Produces(MediaType.TEXT_PLAIN)
public Response getMemoryPools() {
MemoryPoolVO[] voes = createMemoryPools();
StringBuilder sb = new StringBuilder();
for (MemoryPoolVO vo : voes) {
sb.append(vo.getName()).append(" - ").append(vo.getType()).append(" - ").append(vo.getUsage());
}
return Response.ok(sb.toString()).build();
}
use of org.olat.restapi.system.vo.MemoryPoolVO in project openolat by klemens.
the class MemoryWebService method createMemoryPools.
private MemoryPoolVO[] createMemoryPools() {
List<MemoryPoolMXBean> memoryPool = ManagementFactory.getMemoryPoolMXBeans();
MemoryPoolVO[] voes = new MemoryPoolVO[memoryPool.size()];
int count = 0;
for (MemoryPoolMXBean bean : memoryPool) {
if (bean.isValid()) {
voes[count++] = new MemoryPoolVO(bean);
}
}
return voes;
}
use of org.olat.restapi.system.vo.MemoryPoolVO in project openolat by klemens.
the class MemoryWebService method getMemoryPools.
@GET
@Path("pools")
@Produces(MediaType.TEXT_PLAIN)
public Response getMemoryPools() {
MemoryPoolVO[] voes = createMemoryPools();
StringBuilder sb = new StringBuilder();
for (MemoryPoolVO vo : voes) {
sb.append(vo.getName()).append(" - ").append(vo.getType()).append(" - ").append(vo.getUsage());
}
return Response.ok(sb.toString()).build();
}
Aggregations