Package org.apache.storm.container.cgroup

## Class CgroupCenter

- java.lang.Object
- - org.apache.storm.container.cgroup.CgroupCenter

- All Implemented Interfaces:
    `CgroupOperation`

      public class CgroupCenter
      extends Object
      implements CgroupOperation

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static CgroupCenter getInstance()

    - #### getHierarchies

          public List<Hierarchy> getHierarchies()

      Description copied from interface: `CgroupOperation`
      Get a list of hierarchies.
      Specified by:
        `getHierarchies` in interface `CgroupOperation`

    - #### getSubSystems

          public Set<SubSystem> getSubSystems()

      Description copied from interface: `CgroupOperation`
      get a list of available subsystems.
      Specified by:
        `getSubSystems` in interface `CgroupOperation`

    - #### isSubSystemEnabled

          public boolean isSubSystemEnabled​(SubSystemType subSystemType)

      Description copied from interface: `CgroupOperation`
      Check if a subsystem is enabled.
      Specified by:
        `isSubSystemEnabled` in interface `CgroupOperation`

    - #### getHierarchyWithSubSystem

          public Hierarchy getHierarchyWithSubSystem​(SubSystemType subSystem)

      Description copied from interface: `CgroupOperation`
      get the first hierarchy that has a certain subsystem isMounted.
      Specified by:
        `getHierarchyWithSubSystem` in interface `CgroupOperation`

    - #### getHierarchyWithSubSystems

          public Hierarchy getHierarchyWithSubSystems​(List<SubSystemType> subSystems)

      Description copied from interface: `CgroupOperation`
      get the first hierarchy that has a certain list of subsystems isMounted.
      Specified by:
        `getHierarchyWithSubSystems` in interface `CgroupOperation`

    - #### isMounted

          public boolean isMounted​(Hierarchy hierarchy)

      Description copied from interface: `CgroupOperation`
      check if a hiearchy is mounted.
      Specified by:
        `isMounted` in interface `CgroupOperation`

    - #### mount

          public void mount​(Hierarchy hierarchy)
                     throws IOException

      Description copied from interface: `CgroupOperation`
      mount a hierarchy.
      Specified by:
        `mount` in interface `CgroupOperation`
      Throws:
        `IOException`

    - #### umount

          public void umount​(Hierarchy hierarchy)
                      throws IOException

      Description copied from interface: `CgroupOperation`
      umount a heirarchy.
      Specified by:
        `umount` in interface `CgroupOperation`
      Throws:
        `IOException`

    - #### createCgroup

          public void createCgroup​(CgroupCommon cgroup)
                            throws SecurityException

      Description copied from interface: `CgroupOperation`
      create a cgroup.
      Specified by:
        `createCgroup` in interface `CgroupOperation`
      Throws:
        `SecurityException`

    - #### deleteCgroup

          public void deleteCgroup​(CgroupCommon cgroup)
                            throws IOException

      Description copied from interface: `CgroupOperation`
      delete a cgroup.
      Specified by:
        `deleteCgroup` in interface `CgroupOperation`
      Throws:
        `IOException`