Record Class AvailabilityState
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.AvailabilityState
- Record Components:
state- the coarse lifecycle statecause- empty forAvailabilityState.State.AVAILABLE, otherwise a short, log-friendly description
Whether a
Historian, and the engines it owns, is currently usable. Storage, query and
browse paths read it through the Supplier<AvailabilityState> wired into each engine.
Reading AbstractHistorian.availabilityState() is a
single volatile load, so any thread may call it with no I/O, locks or blocking. Backends keep a
volatile AvailabilityState field that background tasks update.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe lifecycle states of a historian or engine. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AvailabilityStateThe state of a normally running historian. -
Constructor Summary
ConstructorsConstructorDescriptionAvailabilityState(AvailabilityState.State state, String cause) Creates an instance of aAvailabilityStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.static AvailabilityStateReturns theAvailabilityState.State.DEGRADEDstate.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.static AvailabilityStateunavailable(String cause) Returns theAvailabilityState.State.UNAVAILABLEstate.
-
Field Details
-
AVAILABLE
The state of a normally running historian.
-
-
Constructor Details
-
Method Details
-
degraded
Returns theAvailabilityState.State.DEGRADEDstate.- Parameters:
cause- a non-null, log-friendly description
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
state
-
cause