Class DefectiveComponents
java.lang.Object
io.openems.edge.bridge.modbus.api.worker.internal.DefectiveComponents
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
DefectiveComponents
(Clock clock) protected
DefectiveComponents
(Clock clock, AtomicReference<LogVerbosity> logVerbosity) DefectiveComponents
(AtomicReference<LogVerbosity> logVerbosity) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a defective Component and sets retry time to now() + .isDueForNextTry
(String componentId) Is the given Component due for next try?.boolean
Is the given Component known to be defective?.void
Removes a defective Component.
-
Field Details
-
INCREASE_WAIT_SECONDS
public static final int INCREASE_WAIT_SECONDS- See Also:
-
MAX_WAIT_SECONDS
public static final int MAX_WAIT_SECONDS- See Also:
-
-
Constructor Details
-
DefectiveComponents
-
DefectiveComponents
protected DefectiveComponents() -
DefectiveComponents
-
DefectiveComponents
-
-
Method Details
-
add
Adds a defective Component and sets retry time to now() + .- Parameters:
componentId
- the Component-ID; not null
-
remove
Removes a defective Component.- Parameters:
componentId
- the Component-ID; not null
-
isKnown
Is the given Component known to be defective?.- Parameters:
componentId
- the Component-ID- Returns:
- true if listed as defective, false if not
-
isDueForNextTry
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
-