|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.ara.rules.ThreadRatioRule
com.sun.enterprise.web.ara.rules.HeapMemoryRule
public class HeapMemoryRule
Based on the application context-root, configure the ReadTask
Pipeline based on the policy metric defined in domain.xml.
| Field Summary | |
|---|---|
protected static ConcurrentHashMap<String,Long> |
appMemoryUsage
Cache application memory usage approximation. |
protected static ConcurrentHashMap<ReadTask,String> |
contextRootyCache
Cache the context-root assocated with a ReadTask |
protected static ConcurrentHashMap<String,Long> |
memoryAllowed
The memory allocated per application. |
| Fields inherited from class com.sun.enterprise.web.ara.rules.ThreadRatioRule |
|---|
ALLOCATION_MODE, allocationPolicy, CEILING, leftRatio, PATH_STRING, pipelines, privilegedTokens, QUERY_STRING, readTask, RESERVE, RULE_TOKENS |
| Constructor Summary | |
|---|---|
HeapMemoryRule()
|
|
| Method Summary | |
|---|---|
Integer |
call()
Invoke the rule. |
protected boolean |
isAllowedToExecute(String token,
Long memoryAllowedSize,
Double allowedRatio)
Determine if an application can execute based on its policy metric and method. |
void |
taskEvent(TaskEvent event)
Reduce the memory usage count when an application complete its execution. |
| Methods inherited from class com.sun.enterprise.web.ara.rules.ThreadRatioRule |
|---|
applyRule, attach, attachement, cancel, getContextRoot, getExecutionTime, isPipelineInUse, newPipeline, setExecutionTime, setFuture |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final ConcurrentHashMap<String,Long> memoryAllowed
protected static final ConcurrentHashMap<String,Long> appMemoryUsage
protected static final ConcurrentHashMap<ReadTask,String> contextRootyCache
ReadTask
| Constructor Detail |
|---|
public HeapMemoryRule()
| Method Detail |
|---|
public Integer call()
throws Exception
ThreadRatioRuleContextRootAlgorithm, configure the ReadTask
Pipeline.
call in interface Callablecall in class ThreadRatioRuleException
protected boolean isAllowedToExecute(String token,
Long memoryAllowedSize,
Double allowedRatio)
throws Exception
Exceptionpublic void taskEvent(TaskEvent event)
taskEvent in interface TaskListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||