Package org.jboss.dashboard.profiler.memory

Examples of org.jboss.dashboard.profiler.memory.MemoryProfiler.freeMemory()


    public boolean processRequest() throws Exception {
        MemoryProfiler memoryProfiler = MemoryProfiler.lookup();
        if (memoryProfiler.isLowMemory()) {
            log.warn("Memory is running low ...");
            memoryProfiler.freeMemory();
            if (memoryProfiler.isLowMemory()) {
                RequestContext requestContext = RequestContext.lookup();
                requestContext.setResponse(new SendErrorResponse(503));
                requestContext.consumeURIPart(requestContext.getURIToBeConsumed());
                log.error("Memory is so low that the request had to be canceled - 503 sent. Consider increasing the JVM memory.");
View Full Code Here


    protected boolean processRequest() throws Exception {
        MemoryProfiler memoryProfiler = MemoryProfiler.lookup();
        if (memoryProfiler.isLowMemory()) {
            log.warn("Memory is running low ...");
            memoryProfiler.freeMemory();
            if (memoryProfiler.isLowMemory()) {
                getControllerStatus().setResponse(new SendErrorResponse(503));
                getControllerStatus().consumeURIPart(getControllerStatus().getURIToBeConsumed());
                log.error("Memory is so low that the request had to be canceled - 503 sent. Consider increasing the JVM memory.");
                return false;
View Full Code Here

    public boolean processRequest(CommandRequest request) throws Exception {
        MemoryProfiler memoryProfiler = MemoryProfiler.lookup();
        if (memoryProfiler.isLowMemory()) {
            log.warn("Memory is running low ...");
            memoryProfiler.freeMemory();
            if (memoryProfiler.isLowMemory()) {
                ControllerStatus controllerStatus = ControllerStatus.lookup();
                controllerStatus.setResponse(new SendErrorResponse(503));
                controllerStatus.consumeURIPart(controllerStatus.getURIToBeConsumed());
                log.error("Memory is so low that the request had to be canceled - 503 sent. Consider increasing the JVM memory.");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.