Interface CgroupCommonOperation
- All Known Implementing Classes:
CgroupCommon
public interface CgroupCommonOperation
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProcs
(int pid) add a process to cgroup.void
addTask
(int taskid) add task to cgroup.boolean
get the cgroup.clone_children config.boolean
to get the notify_on_release config.getPids()
get the PIDs of processes running in cgroup.get the command for the relase agent to execute.getTasks()
Get a list of task ids running in CGroup.void
setCgroupCloneChildren
(boolean flag) Set the cgroup.clone_children config.void
setEventControl
(String eventFd, String controlFd, String... args) set event control config.void
setNotifyOnRelease
(boolean flag) to set notify_on_release config in cgroup.void
setReleaseAgent
(String command) set a command for the release agent to execute.
-
Method Details
-
addTask
add task to cgroup.- Parameters:
taskid
- task id of task to add- Throws:
IOException
-
getTasks
Get a list of task ids running in CGroup.- Throws:
IOException
-
addProcs
add a process to cgroup.- Parameters:
pid
- the PID of the process to add- Throws:
IOException
-
getPids
get the PIDs of processes running in cgroup.- Throws:
IOException
-
getNotifyOnRelease
to get the notify_on_release config.- Throws:
IOException
-
setNotifyOnRelease
to set notify_on_release config in cgroup.- Throws:
IOException
-
getReleaseAgent
get the command for the relase agent to execute.- Throws:
IOException
-
setReleaseAgent
set a command for the release agent to execute.- Throws:
IOException
-
getCgroupCloneChildren
get the cgroup.clone_children config.- Throws:
IOException
-
setCgroupCloneChildren
Set the cgroup.clone_children config.- Throws:
IOException
-
setEventControl
set event control config.- Throws:
IOException
-