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 class
MemoryCore.Stat
-
Field Summary
Fields Modifier and Type Field Description static String
MEMORY_FAILCNT
static String
MEMORY_FORCE_EMPTY
static String
MEMORY_LIMIT_IN_BYTES
static String
MEMORY_MAX_USAGE_IN_BYTES
static String
MEMORY_MEMSW_FAILCNT
static String
MEMORY_MEMSW_LIMIT_IN_BYTES
static String
MEMORY_MEMSW_MAX_USAGE_IN_BYTES
static String
MEMORY_MEMSW_USAGE_IN_BYTES
static String
MEMORY_OOM_CONTROL
static String
MEMORY_STAT
static String
MEMORY_SWAPPINESS
static String
MEMORY_USAGE_IN_BYTES
static String
MEMORY_USE_HIERARCHY
-
Constructor Summary
Constructors Constructor Description MemoryCore(String dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearForceEmpty()
long
getMaxPhysicalUsage()
long
getMaxWithSwapUsage()
int
getPhysicalFailCount()
long
getPhysicalUsage()
long
getPhysicalUsageLimit()
MemoryCore.Stat
getStat()
int
getSwappiness()
SubSystemType
getType()
int
getWithSwapFailCount()
long
getWithSwapUsage()
long
getWithSwapUsageLimit()
boolean
isOomControl()
boolean
isUseHierarchy()
void
setOomControl(boolean flag)
void
setPhysicalUsageLimit(long value)
void
setSwappiness(int value)
void
setUseHierarchy(boolean flag)
void
setWithSwapUsageLimit(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:
getType
in 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
-
-