Interface CgroupOperation
-
- All Known Implementing Classes:
CgroupCenter
public interface CgroupOperationAn interface to implement the basic functions to manage cgroups such as mount and mounting a hiearchy and creating cgroups. Also contains functions to access basic information of cgroups.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateCgroup(CgroupCommon cgroup)create a cgroup.voiddeleteCgroup(CgroupCommon cgroup)delete a cgroup.List<Hierarchy>getHierarchies()Get a list of hierarchies.HierarchygetHierarchyWithSubSystem(SubSystemType subsystem)get the first hierarchy that has a certain subsystem isMounted.HierarchygetHierarchyWithSubSystems(List<SubSystemType> subSystems)get the first hierarchy that has a certain list of subsystems isMounted.Set<SubSystem>getSubSystems()get a list of available subsystems.booleanisMounted(Hierarchy hierarchy)check if a hiearchy is mounted.booleanisSubSystemEnabled(SubSystemType subsystem)Check if a subsystem is enabled.voidmount(Hierarchy hierarchy)mount a hierarchy.voidumount(Hierarchy hierarchy)umount a heirarchy.
-
-
-
Method Detail
-
isSubSystemEnabled
boolean isSubSystemEnabled(SubSystemType subsystem)
Check if a subsystem is enabled.
-
getHierarchyWithSubSystem
Hierarchy getHierarchyWithSubSystem(SubSystemType subsystem)
get the first hierarchy that has a certain subsystem isMounted.
-
getHierarchyWithSubSystems
Hierarchy getHierarchyWithSubSystems(List<SubSystemType> subSystems)
get the first hierarchy that has a certain list of subsystems isMounted.
-
isMounted
boolean isMounted(Hierarchy hierarchy)
check if a hiearchy is mounted.
-
mount
void mount(Hierarchy hierarchy) throws IOException
mount a hierarchy.- Throws:
IOException
-
umount
void umount(Hierarchy hierarchy) throws IOException
umount a heirarchy.- Throws:
IOException
-
createCgroup
void createCgroup(CgroupCommon cgroup) throws SecurityException
create a cgroup.- Throws:
SecurityException
-
deleteCgroup
void deleteCgroup(CgroupCommon cgroup) throws IOException
delete a cgroup.- Throws:
IOException
-
-