Record Class StorageKey
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.storeforward.StorageKey
- Record Components:
engineId
- identifies the target enginesinkId
- identifies the specific sink within the engine
A composite key that identifies storage destinations and sinks within the store-and-forward system.
This key serves dual purposes:
- Registration key for data sinks within engines
- Routing key for associating data with storage destinations
All storage destinations require both an engine ID and a sink ID. The sink ID can be the same as the engine ID to indicate the primary/default storage location.
-
Constructor Summary
ConstructorsConstructorDescriptionStorageKey
(String engineId, String sinkId) Constructs a new StorageKey with validation. -
Method Summary
Modifier and TypeMethodDescriptionengineId()
Returns the value of theengineId
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static StorageKey
Creates a StorageKey with separate engine and sink identifiers.static StorageKey
Creates a StorageKey where the same ID is used for both engine and sink.sinkId()
Returns the value of thesinkId
record component.@NotNull String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
StorageKey
Constructs a new StorageKey with validation.- Throws:
IllegalArgumentException
- if engineId or sinkId is null or blank
-
-
Method Details
-
repeated
Creates a StorageKey where the same ID is used for both engine and sink. This represents the primary/default storage location within the engine.- Parameters:
id
- the identifier to use for both engine and sink- Returns:
- new StorageKey instance with the same ID for both components
- Throws:
IllegalArgumentException
- if id is null or blank
-
of
Creates a StorageKey with separate engine and sink identifiers. This allows routing data to specific named sinks within an engine.- Parameters:
engineId
- the engine identifiersinkId
- the sink identifier- Returns:
- new StorageKey instance with separate engine and sink IDs
- Throws:
IllegalArgumentException
- if engineId or sinkId is null or blank
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
engineId
Returns the value of theengineId
record component.- Returns:
- the value of the
engineId
record component
-
sinkId
Returns the value of thesinkId
record component.- Returns:
- the value of the
sinkId
record component
-