Remove getMXBean
Dieser Commit ist enthalten in:
Ursprung
a59b01f43b
Commit
f7f97af2bf
@ -287,32 +287,6 @@ public class BackgroundCompiler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve the current usage of the Perm Gen space in percentage.
|
|
||||||
* @return Usage of the perm gen space.
|
|
||||||
*/
|
|
||||||
private double getPermGenUsage() {
|
|
||||||
Object permGenBean = this.permGenBean;
|
|
||||||
if (permGenBean == unknownPermGenBean) {
|
|
||||||
for (MemoryPoolMXBean item : ManagementFactory.getMemoryPoolMXBeans()) {
|
|
||||||
if (item.getName().contains("Perm Gen")) {
|
|
||||||
permGenBean = this.permGenBean = item;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (permGenBean == unknownPermGenBean) {
|
|
||||||
permGenBean = this.permGenBean = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (permGenBean != null) {
|
|
||||||
MemoryUsage usage = ((MemoryPoolMXBean) permGenBean).getUsage();
|
|
||||||
return usage.getUsed() / (double) usage.getCommitted();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unknown
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after ourselves using the default timeout.
|
* Clean up after ourselves using the default timeout.
|
||||||
*/
|
*/
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren