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
Get a list of hierarchies.
getHierarchies
in interface CgroupOperation
public Set<SubSystem> getSubSystems()
CgroupOperation
get a list of available subsystems.
getSubSystems
in interface CgroupOperation
public boolean isSubSystemEnabled(SubSystemType subSystemType)
CgroupOperation
Check if a subsystem is enabled.
isSubSystemEnabled
in interface CgroupOperation
public Hierarchy getHierarchyWithSubSystem(SubSystemType subSystem)
CgroupOperation
get the first hierarchy that has a certain subsystem isMounted.
getHierarchyWithSubSystem
in interface CgroupOperation
public Hierarchy getHierarchyWithSubSystems(List<SubSystemType> subSystems)
CgroupOperation
get the first hierarchy that has a certain list of subsystems isMounted.
getHierarchyWithSubSystems
in interface CgroupOperation
public boolean isMounted(Hierarchy hierarchy)
CgroupOperation
check if a hiearchy is mounted.
isMounted
in interface CgroupOperation
public void mount(Hierarchy hierarchy) throws IOException
CgroupOperation
mount a hierarchy.
mount
in interface CgroupOperation
IOException
public void umount(Hierarchy hierarchy) throws IOException
CgroupOperation
umount a heirarchy.
umount
in interface CgroupOperation
IOException
public void createCgroup(CgroupCommon cgroup) throws SecurityException
CgroupOperation
create a cgroup.
createCgroup
in interface CgroupOperation
SecurityException
public void deleteCgroup(CgroupCommon cgroup) throws IOException
CgroupOperation
delete a cgroup.
deleteCgroup
in interface CgroupOperation
IOException
Copyright © 2022 The Apache Software Foundation. All rights reserved.