Class CgroupCenter
java.lang.Object
org.apache.storm.container.cgroup.CgroupCenter
- All Implemented Interfaces:
CgroupOperation
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createCgroup
(CgroupCommon cgroup) create a cgroup.void
deleteCgroup
(CgroupCommon cgroup) delete a cgroup.Get a list of hierarchies.getHierarchyWithSubSystem
(SubSystemType subSystem) get the first hierarchy that has a certain subsystem isMounted.getHierarchyWithSubSystems
(List<SubSystemType> subSystems) get the first hierarchy that has a certain list of subsystems isMounted.static CgroupCenter
get a list of available subsystems.boolean
check if a hiearchy is mounted.boolean
isSubSystemEnabled
(SubSystemType subSystemType) Check if a subsystem is enabled.void
mount a hierarchy.void
umount a heirarchy.
-
Method Details
-
getInstance
-
getHierarchies
Description copied from interface:CgroupOperation
Get a list of hierarchies.- Specified by:
getHierarchies
in interfaceCgroupOperation
-
getSubSystems
Description copied from interface:CgroupOperation
get a list of available subsystems.- Specified by:
getSubSystems
in interfaceCgroupOperation
-
isSubSystemEnabled
Description copied from interface:CgroupOperation
Check if a subsystem is enabled.- Specified by:
isSubSystemEnabled
in interfaceCgroupOperation
-
getHierarchyWithSubSystem
Description copied from interface:CgroupOperation
get the first hierarchy that has a certain subsystem isMounted.- Specified by:
getHierarchyWithSubSystem
in interfaceCgroupOperation
-
getHierarchyWithSubSystems
Description copied from interface:CgroupOperation
get the first hierarchy that has a certain list of subsystems isMounted.- Specified by:
getHierarchyWithSubSystems
in interfaceCgroupOperation
-
isMounted
Description copied from interface:CgroupOperation
check if a hiearchy is mounted.- Specified by:
isMounted
in interfaceCgroupOperation
-
mount
Description copied from interface:CgroupOperation
mount a hierarchy.- Specified by:
mount
in interfaceCgroupOperation
- Throws:
IOException
-
umount
Description copied from interface:CgroupOperation
umount a heirarchy.- Specified by:
umount
in interfaceCgroupOperation
- Throws:
IOException
-
createCgroup
Description copied from interface:CgroupOperation
create a cgroup.- Specified by:
createCgroup
in interfaceCgroupOperation
- Throws:
SecurityException
-
deleteCgroup
Description copied from interface:CgroupOperation
delete a cgroup.- Specified by:
deleteCgroup
in interfaceCgroupOperation
- Throws:
IOException
-