@ManagedOperation(description = "Sets the memory threshold for the memory warning system")
@ManagedOperationParameters({ @ManagedOperationParameter(description = "The memory threshold", name = "memoryThreshold"), })
public void setMemoryThreshold(double memoryThreshold) {
MemoryWarningService memoryWarningService = (MemoryWarningService) ctx
.getBean("memoryWarningService");
memoryWarningService.setPercentageUsageThreshold(memoryThreshold);
LOG.info("Memory threshold set to " + memoryThreshold);
}