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.
Modifier and Type | Method and 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.
|
boolean isSubSystemEnabled(SubSystemType subsystem)
Check if a subsystem is enabled.
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.
boolean isMounted(Hierarchy hierarchy)
check if a hiearchy is mounted.
void mount(Hierarchy hierarchy) throws IOException
mount a hierarchy.
IOException
void umount(Hierarchy hierarchy) throws IOException
umount a heirarchy.
IOException
void createCgroup(CgroupCommon cgroup) throws SecurityException
create a cgroup.
SecurityException
void deleteCgroup(CgroupCommon cgroup) throws IOException
delete a cgroup.
IOException
Copyright © 2022 The Apache Software Foundation. All rights reserved.