Class DefectiveComponents

java.lang.Object
io.openems.edge.bridge.modbus.api.worker.internal.DefectiveComponents

public class DefectiveComponents extends Object
  • Field Details

  • Constructor Details

    • DefectiveComponents

      public DefectiveComponents(AtomicReference<LogVerbosity> logVerbosity)
    • DefectiveComponents

      protected DefectiveComponents()
    • DefectiveComponents

      protected DefectiveComponents(Clock clock)
    • DefectiveComponents

      protected DefectiveComponents(Clock clock, AtomicReference<LogVerbosity> logVerbosity)
  • Method Details

    • add

      public void add(String componentId)
      Adds a defective Component and sets retry time to now() + .
      Parameters:
      componentId - the Component-ID; not null
    • remove

      public void remove(String componentId)
      Removes a defective Component.
      Parameters:
      componentId - the Component-ID; not null
    • isKnown

      public boolean isKnown(String componentId)
      Is the given Component known to be defective?.
      Parameters:
      componentId - the Component-ID
      Returns:
      true if listed as defective, false if not
    • isDueForNextTry

      public Boolean isDueForNextTry(String componentId)
      Is the given Component due for next try?.
      Parameters:
      componentId - the Component-ID
      Returns:
      true if yes, false if no, null if component is not in list of defective components