Class PluginResources


  • public final class PluginResources
    extends Object
    PluginResources contains information about how many resources will be used for a plugin. The most common resources to specify are CPU and memory (RAM).

    CPU resources are measured in cpu units. One cpu is equivalent to 1 vCPU/Core for cloud providers and 1 hyperthread on bare-metal Intel processors. Also, fractional requests are allowed. A plugin that asks 0.5 CPU uses half as much CPU as one that asks for 1 CPU.

    Memory resources are measured in Megabytes.

    Here is an example to set resources for a plugin:

         Resources.builder()
             .maximumCpu("1.5")
             .maximumMemory("1024")
             .build();
     
    In this example the plugin has a limit of 1 cpu and 1G of memory.