public class CgroupCenter extends Object implements CgroupOperation
| 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.
|
static CgroupCenter |
getInstance() |
Set<SubSystem> |
getSubSystems()
get a list of available subsystems.
|
boolean |
isMounted(Hierarchy hierarchy)
check if a hiearchy is mounted.
|
boolean |
isSubSystemEnabled(SubSystemType subSystemType)
Check if a subsystem is enabled.
|
void |
mount(Hierarchy hierarchy)
mount a hierarchy.
|
void |
umount(Hierarchy hierarchy)
umount a heirarchy.
|
public static CgroupCenter getInstance()
public List<Hierarchy> getHierarchies()
CgroupOperationgetHierarchies in interface CgroupOperationpublic Set<SubSystem> getSubSystems()
CgroupOperationgetSubSystems in interface CgroupOperationpublic boolean isSubSystemEnabled(SubSystemType subSystemType)
CgroupOperationisSubSystemEnabled in interface CgroupOperationpublic Hierarchy getHierarchyWithSubSystem(SubSystemType subSystem)
CgroupOperationgetHierarchyWithSubSystem in interface CgroupOperationpublic Hierarchy getHierarchyWithSubSystems(List<SubSystemType> subSystems)
CgroupOperationgetHierarchyWithSubSystems in interface CgroupOperationpublic boolean isMounted(Hierarchy hierarchy)
CgroupOperationisMounted in interface CgroupOperationpublic void mount(Hierarchy hierarchy) throws IOException
CgroupOperationmount in interface CgroupOperationIOExceptionpublic void umount(Hierarchy hierarchy) throws IOException
CgroupOperationumount in interface CgroupOperationIOExceptionpublic void createCgroup(CgroupCommon cgroup) throws SecurityException
CgroupOperationcreateCgroup in interface CgroupOperationSecurityExceptionpublic void deleteCgroup(CgroupCommon cgroup) throws IOException
CgroupOperationdeleteCgroup in interface CgroupOperationIOExceptionCopyright © 2023 The Apache Software Foundation. All rights reserved.