Interface CgroupCommonOperation
-
- All Known Implementing Classes:
CgroupCommon
public interface CgroupCommonOperation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddProcs(int pid)add a process to cgroup.voidaddTask(int taskid)add task to cgroup.booleangetCgroupCloneChildren()get the cgroup.clone_children config.booleangetNotifyOnRelease()to get the notify_on_release config.Set<Long>getPids()get the PIDs of processes running in cgroup.StringgetReleaseAgent()get the command for the relase agent to execute.Set<Integer>getTasks()Get a list of task ids running in CGroup.voidsetCgroupCloneChildren(boolean flag)Set the cgroup.clone_children config.voidsetEventControl(String eventFd, String controlFd, String... args)set event control config.voidsetNotifyOnRelease(boolean flag)to set notify_on_release config in cgroup.voidsetReleaseAgent(String command)set a command for the release agent to execute.
-
-
-
Method Detail
-
addTask
void addTask(int taskid) throws IOExceptionadd task to cgroup.- Parameters:
taskid- task id of task to add- Throws:
IOException
-
getTasks
Set<Integer> getTasks() throws IOException
Get a list of task ids running in CGroup.- Throws:
IOException
-
addProcs
void addProcs(int pid) throws IOExceptionadd a process to cgroup.- Parameters:
pid- the PID of the process to add- Throws:
IOException
-
getPids
Set<Long> getPids() throws IOException
get the PIDs of processes running in cgroup.- Throws:
IOException
-
getNotifyOnRelease
boolean getNotifyOnRelease() throws IOExceptionto get the notify_on_release config.- Throws:
IOException
-
setNotifyOnRelease
void setNotifyOnRelease(boolean flag) throws IOExceptionto set notify_on_release config in cgroup.- Throws:
IOException
-
getReleaseAgent
String getReleaseAgent() throws IOException
get the command for the relase agent to execute.- Throws:
IOException
-
setReleaseAgent
void setReleaseAgent(String command) throws IOException
set a command for the release agent to execute.- Throws:
IOException
-
getCgroupCloneChildren
boolean getCgroupCloneChildren() throws IOExceptionget the cgroup.clone_children config.- Throws:
IOException
-
setCgroupCloneChildren
void setCgroupCloneChildren(boolean flag) throws IOExceptionSet the cgroup.clone_children config.- Throws:
IOException
-
setEventControl
void setEventControl(String eventFd, String controlFd, String... args) throws IOException
set event control config.- Throws:
IOException
-
-