java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.storeforward.StorageKey
Record Components:
engineId - identifies the target engine
sinkId - identifies the specific sink within the engine

public record StorageKey(String engineId, String sinkId) extends Record
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 Details

    • StorageKey

      public StorageKey(String engineId, String sinkId)
      Constructs a new StorageKey with validation.
      Throws:
      IllegalArgumentException - if engineId or sinkId is null or blank
  • Method Details

    • repeated

      public static StorageKey repeated(String id)
      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

      public static StorageKey of(String engineId, String sinkId)
      Creates a StorageKey with separate engine and sink identifiers. This allows routing data to specific named sinks within an engine.
      Parameters:
      engineId - the engine identifier
      sinkId - the sink identifier
      Returns:
      new StorageKey instance with separate engine and sink IDs
      Throws:
      IllegalArgumentException - if engineId or sinkId is null or blank
    • toString

      @NotNull public @NotNull String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • engineId

      public String engineId()
      Returns the value of the engineId record component.
      Returns:
      the value of the engineId record component
    • sinkId

      public String sinkId()
      Returns the value of the sinkId record component.
      Returns:
      the value of the sinkId record component