Class DynamicComponentStorage

java.lang.Object
de.bytestore.hostinger.components.storage.DynamicComponentStorage

public class DynamicComponentStorage extends Object
  • Field Details

  • Constructor Details

    • DynamicComponentStorage

      public DynamicComponentStorage()
  • Method Details

    • addItemOrGet

      public DynamicItem addItemOrGet(Object keyIO, DynamicItemInit initEvent)
      Adds a new DynamicItem to the components map if the specified key is not already present. If a DynamicItem already exists for the given key, it returns the existing item.
      Parameters:
      keyIO - the key used to locate the DynamicItem within the components map
      Returns:
      the existing DynamicItem for the given key or a newly created DynamicItem if the key was not present
    • cpuProgress

      public com.vaadin.flow.component.Component cpuProgress(Object jpaIO)
      Generates a CPU progress component for the given object. This method creates a dynamic component associated with the CPU usage of the provided object. It uses a progress indicator to reflect the CPU status and updates it periodically based on statistics fetched for the object.
      Parameters:
      jpaIO - the object from which CPU statistics are retrieved. It is expected to be an instance from which process statistics can be derived.
      Returns:
      a Component representing the CPU progress for the provided object. This component updates dynamically to reflect the current CPU load.
    • memoryProgress

      public com.vaadin.flow.component.Component memoryProgress(Object jpaIO)
      Creates and manages a memory progress component using the given object. This component tracks memory usage and periodically updates its display based on statistical data derived from the object.
      Parameters:
      jpaIO - the object from which memory statistics are retrieved. It may represent various entities like processes or virtualized instances, from which memory usage statistics can be extracted.
      Returns:
      a Component that visually represents the memory usage for the provided object. The component updates dynamically to reflect changes in memory usage.
    • storageProgress

      public com.vaadin.flow.component.Component storageProgress(Object jpaIO)
      Creates and updates a storage progress component for the specified object. This method initializes a dynamic component to track storage usage and periodically fetches updates from the object.
      Parameters:
      jpaIO - the object from which storage statistics are retrieved. It could represent entities such as processes or virtualized instances, from which storage usage data can be extracted.
      Returns:
      a Component representing the storage progress for the given object. The component dynamically updates to reflect current storage usage, showing the percentage and tooltip with detailed usage.