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()
CgroupOperation
getHierarchies
in interface CgroupOperation
public Set<SubSystem> getSubSystems()
CgroupOperation
getSubSystems
in interface CgroupOperation
public boolean isSubSystemEnabled(SubSystemType subSystemType)
CgroupOperation
isSubSystemEnabled
in interface CgroupOperation
public Hierarchy getHierarchyWithSubSystem(SubSystemType subSystem)
CgroupOperation
getHierarchyWithSubSystem
in interface CgroupOperation
public Hierarchy getHierarchyWithSubSystems(List<SubSystemType> subSystems)
CgroupOperation
getHierarchyWithSubSystems
in interface CgroupOperation
public boolean isMounted(Hierarchy hierarchy)
CgroupOperation
isMounted
in interface CgroupOperation
public void mount(Hierarchy hierarchy) throws IOException
CgroupOperation
mount
in interface CgroupOperation
IOException
public void umount(Hierarchy hierarchy) throws IOException
CgroupOperation
umount
in interface CgroupOperation
IOException
public void createCgroup(CgroupCommon cgroup) throws SecurityException
CgroupOperation
createCgroup
in interface CgroupOperation
SecurityException
public void deleteCgroup(CgroupCommon cgroup) throws IOException
CgroupOperation
deleteCgroup
in interface CgroupOperation
IOException
Copyright © 2023 The Apache Software Foundation. All rights reserved.