@InterfaceAudience.Private
@InterfaceStability.Unstable
public interface CGroupsHandler
Modifier and Type | Interface and Description |
---|---|
static class |
CGroupsHandler.CGroupController
List of supported cgroup subsystem types.
|
Modifier and Type | Field and Description |
---|---|
static String |
CGROUP_CPU_PERIOD_US |
static String |
CGROUP_CPU_QUOTA_US |
static String |
CGROUP_CPU_SHARES |
static String |
CGROUP_NO_LIMIT |
static String |
CGROUP_PARAM_BLKIO_WEIGHT |
static String |
CGROUP_PARAM_CLASSID |
static String |
CGROUP_PARAM_MEMORY_HARD_LIMIT_BYTES |
static String |
CGROUP_PARAM_MEMORY_MEMSW_USAGE_BYTES |
static String |
CGROUP_PARAM_MEMORY_OOM_CONTROL |
static String |
CGROUP_PARAM_MEMORY_SOFT_LIMIT_BYTES |
static String |
CGROUP_PARAM_MEMORY_SWAP_HARD_LIMIT_BYTES |
static String |
CGROUP_PARAM_MEMORY_SWAPPINESS |
static String |
CGROUP_PARAM_MEMORY_USAGE_BYTES |
static String |
CGROUP_PROCS_FILE |
static String |
UNDER_OOM |
Modifier and Type | Method and Description |
---|---|
String |
createCGroup(CGroupsHandler.CGroupController controller,
String cGroupId)
Creates a cgroup for a given controller.
|
void |
deleteCGroup(CGroupsHandler.CGroupController controller,
String cGroupId)
Deletes the specified cgroup.
|
String |
getCGroupMountPath()
Returns CGroup Mount Path.
|
String |
getCGroupParam(CGroupsHandler.CGroupController controller,
String cGroupId,
String param)
reads a cgroup parameter value, given a controller, cgroup id, parameter.
|
String |
getControllerPath(CGroupsHandler.CGroupController controller)
Gets the absolute path to the specified cgroup controller.
|
String |
getPathForCGroup(CGroupsHandler.CGroupController controller,
String cGroupId)
Gets the full path for the cgroup, given a controller and a cgroup id.
|
String |
getPathForCGroupParam(CGroupsHandler.CGroupController controller,
String cGroupId,
String param)
Gets the full path for a cgroup parameter, given a controller,
cgroup id and parameter name.
|
String |
getPathForCGroupTasks(CGroupsHandler.CGroupController controller,
String cGroupId)
Gets the full path for the cgroup's tasks file, given a controller and a
cgroup id.
|
String |
getRelativePathForCGroup(String cGroupId)
Gets the relative path for the cgroup, independent of a controller, for a
given cgroup id.
|
void |
initializeCGroupController(CGroupsHandler.CGroupController controller)
Mounts or initializes a cgroup controller.
|
void |
updateCGroupParam(CGroupsHandler.CGroupController controller,
String cGroupId,
String param,
String value)
updates a cgroup parameter, given a controller, cgroup id, parameter name.
|
static final String CGROUP_PROCS_FILE
static final String CGROUP_PARAM_CLASSID
static final String CGROUP_PARAM_BLKIO_WEIGHT
static final String CGROUP_PARAM_MEMORY_HARD_LIMIT_BYTES
static final String CGROUP_PARAM_MEMORY_SWAP_HARD_LIMIT_BYTES
static final String CGROUP_PARAM_MEMORY_SOFT_LIMIT_BYTES
static final String CGROUP_PARAM_MEMORY_OOM_CONTROL
static final String CGROUP_PARAM_MEMORY_SWAPPINESS
static final String CGROUP_PARAM_MEMORY_USAGE_BYTES
static final String CGROUP_PARAM_MEMORY_MEMSW_USAGE_BYTES
static final String CGROUP_NO_LIMIT
static final String UNDER_OOM
static final String CGROUP_CPU_PERIOD_US
static final String CGROUP_CPU_QUOTA_US
static final String CGROUP_CPU_SHARES
void initializeCGroupController(CGroupsHandler.CGroupController controller) throws ResourceHandlerException
controller
- - the controller being initializedResourceHandlerException
- the initialization failed due to the
environmentString createCGroup(CGroupsHandler.CGroupController controller, String cGroupId) throws ResourceHandlerException
controller
- - controller type for which the cgroup is being createdcGroupId
- - id of the cgroup being createdResourceHandlerException
- creation failedvoid deleteCGroup(CGroupsHandler.CGroupController controller, String cGroupId) throws ResourceHandlerException
controller
- - controller type for the cgroupcGroupId
- - id of the cgroup being deletedResourceHandlerException
- deletion failedString getControllerPath(CGroupsHandler.CGroupController controller)
controller
- - controller type for the cgroupString getRelativePathForCGroup(String cGroupId)
cGroupId
- - id of the cgroupString getPathForCGroup(CGroupsHandler.CGroupController controller, String cGroupId)
controller
- - controller type for the cgroupcGroupId
- - id of the cgroupString getPathForCGroupTasks(CGroupsHandler.CGroupController controller, String cGroupId)
controller
- - controller type for the cgroupcGroupId
- - id of the cgroupString getPathForCGroupParam(CGroupsHandler.CGroupController controller, String cGroupId, String param)
controller
- - controller type for the cgroupcGroupId
- - id of the cgroupparam
- - cgroup parameter ( e.g classid )void updateCGroupParam(CGroupsHandler.CGroupController controller, String cGroupId, String param, String value) throws ResourceHandlerException
controller
- - controller type for the cgroupcGroupId
- - id of the cgroupparam
- - cgroup parameter ( e.g classid )value
- - value to be written to the parameter fileResourceHandlerException
- the operation failedString getCGroupParam(CGroupsHandler.CGroupController controller, String cGroupId, String param) throws ResourceHandlerException
controller
- - controller type for the cgroupcGroupId
- - id of the cgroupparam
- - cgroup parameter ( e.g classid )ResourceHandlerException
- the operation failedString getCGroupMountPath()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.