Interface CgroupOperation
-
- All Known Implementing Classes:
CgroupCenter
public interface CgroupOperation
An 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 void
createCgroup(CgroupCommon cgroup)
create a cgroup.void
deleteCgroup(CgroupCommon cgroup)
delete a cgroup.List<Hierarchy>
getHierarchies()
Get a list of hierarchies.Hierarchy
getHierarchyWithSubSystem(SubSystemType subsystem)
get the first hierarchy that has a certain subsystem isMounted.Hierarchy
getHierarchyWithSubSystems(List<SubSystemType> subSystems)
get the first hierarchy that has a certain list of subsystems isMounted.Set<SubSystem>
getSubSystems()
get a list of available subsystems.boolean
isMounted(Hierarchy hierarchy)
check if a hiearchy is mounted.boolean
isSubSystemEnabled(SubSystemType subsystem)
Check if a subsystem is enabled.void
mount(Hierarchy hierarchy)
mount a hierarchy.void
umount(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
-
-