Class MemoryCore
- java.lang.Object
-
- org.apache.storm.container.cgroup.core.MemoryCore
-
- All Implemented Interfaces:
CgroupCore
public class MemoryCore extends Object implements CgroupCore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMemoryCore.Stat
-
Field Summary
Fields Modifier and Type Field Description static StringMEMORY_FAILCNTstatic StringMEMORY_FORCE_EMPTYstatic StringMEMORY_LIMIT_IN_BYTESstatic StringMEMORY_MAX_USAGE_IN_BYTESstatic StringMEMORY_MEMSW_FAILCNTstatic StringMEMORY_MEMSW_LIMIT_IN_BYTESstatic StringMEMORY_MEMSW_MAX_USAGE_IN_BYTESstatic StringMEMORY_MEMSW_USAGE_IN_BYTESstatic StringMEMORY_OOM_CONTROLstatic StringMEMORY_STATstatic StringMEMORY_SWAPPINESSstatic StringMEMORY_USAGE_IN_BYTESstatic StringMEMORY_USE_HIERARCHY
-
Constructor Summary
Constructors Constructor Description MemoryCore(String dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearForceEmpty()longgetMaxPhysicalUsage()longgetMaxWithSwapUsage()intgetPhysicalFailCount()longgetPhysicalUsage()longgetPhysicalUsageLimit()MemoryCore.StatgetStat()intgetSwappiness()SubSystemTypegetType()intgetWithSwapFailCount()longgetWithSwapUsage()longgetWithSwapUsageLimit()booleanisOomControl()booleanisUseHierarchy()voidsetOomControl(boolean flag)voidsetPhysicalUsageLimit(long value)voidsetSwappiness(int value)voidsetUseHierarchy(boolean flag)voidsetWithSwapUsageLimit(long value)
-
-
-
Field Detail
-
MEMORY_STAT
public static final String MEMORY_STAT
- See Also:
- Constant Field Values
-
MEMORY_USAGE_IN_BYTES
public static final String MEMORY_USAGE_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_MEMSW_USAGE_IN_BYTES
public static final String MEMORY_MEMSW_USAGE_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_MAX_USAGE_IN_BYTES
public static final String MEMORY_MAX_USAGE_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_MEMSW_MAX_USAGE_IN_BYTES
public static final String MEMORY_MEMSW_MAX_USAGE_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_LIMIT_IN_BYTES
public static final String MEMORY_LIMIT_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_MEMSW_LIMIT_IN_BYTES
public static final String MEMORY_MEMSW_LIMIT_IN_BYTES
- See Also:
- Constant Field Values
-
MEMORY_FAILCNT
public static final String MEMORY_FAILCNT
- See Also:
- Constant Field Values
-
MEMORY_MEMSW_FAILCNT
public static final String MEMORY_MEMSW_FAILCNT
- See Also:
- Constant Field Values
-
MEMORY_FORCE_EMPTY
public static final String MEMORY_FORCE_EMPTY
- See Also:
- Constant Field Values
-
MEMORY_SWAPPINESS
public static final String MEMORY_SWAPPINESS
- See Also:
- Constant Field Values
-
MEMORY_USE_HIERARCHY
public static final String MEMORY_USE_HIERARCHY
- See Also:
- Constant Field Values
-
MEMORY_OOM_CONTROL
public static final String MEMORY_OOM_CONTROL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MemoryCore
public MemoryCore(String dir)
-
-
Method Detail
-
getType
public SubSystemType getType()
- Specified by:
getTypein interfaceCgroupCore
-
getStat
public MemoryCore.Stat getStat() throws IOException
- Throws:
IOException
-
getPhysicalUsage
public long getPhysicalUsage() throws IOException- Throws:
IOException
-
getWithSwapUsage
public long getWithSwapUsage() throws IOException- Throws:
IOException
-
getMaxPhysicalUsage
public long getMaxPhysicalUsage() throws IOException- Throws:
IOException
-
getMaxWithSwapUsage
public long getMaxWithSwapUsage() throws IOException- Throws:
IOException
-
getPhysicalUsageLimit
public long getPhysicalUsageLimit() throws IOException- Throws:
IOException
-
setPhysicalUsageLimit
public void setPhysicalUsageLimit(long value) throws IOException- Throws:
IOException
-
getWithSwapUsageLimit
public long getWithSwapUsageLimit() throws IOException- Throws:
IOException
-
setWithSwapUsageLimit
public void setWithSwapUsageLimit(long value) throws IOException- Throws:
IOException
-
getPhysicalFailCount
public int getPhysicalFailCount() throws IOException- Throws:
IOException
-
getWithSwapFailCount
public int getWithSwapFailCount() throws IOException- Throws:
IOException
-
clearForceEmpty
public void clearForceEmpty() throws IOException- Throws:
IOException
-
getSwappiness
public int getSwappiness() throws IOException- Throws:
IOException
-
setSwappiness
public void setSwappiness(int value) throws IOException- Throws:
IOException
-
isUseHierarchy
public boolean isUseHierarchy() throws IOException- Throws:
IOException
-
setUseHierarchy
public void setUseHierarchy(boolean flag) throws IOException- Throws:
IOException
-
isOomControl
public boolean isOomControl() throws IOException- Throws:
IOException
-
setOomControl
public void setOomControl(boolean flag) throws IOException- Throws:
IOException
-
-