Record Class CollectorId
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.storage.realtime.CollectorId
Represents a unique identifier for a data collector. Combines a string identifier and collection
mode.
-
Constructor Summary
ConstructorsConstructorDescriptionCollectorId(String id, CollectionMode mode) Creates an instance of aCollectorIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static CollectorIdfromString(String id, CollectionMode mode) Creates a collector ID with the specified string identifier and mode.static CollectorIdfromUuid(UUID uuid, CollectionMode mode) Creates a collector ID with the specified UUID and mode.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.mode()Returns the value of themoderecord component.static CollectorIdrandom(CollectionMode mode) Creates a collector ID with a random UUID and specified mode.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollectorId
Creates an instance of aCollectorIdrecord class.- Parameters:
id- the value for theidrecord componentmode- the value for themoderecord component
-
-
Method Details
-
random
Creates a collector ID with a random UUID and specified mode.- Parameters:
mode- The collection mode- Returns:
- A new collector ID with a random UUID
-
fromUuid
Creates a collector ID with the specified UUID and mode.- Parameters:
uuid- The UUID to use as identifiermode- The collection mode- Returns:
- A new collector ID
-
fromString
Creates a collector ID with the specified string identifier and mode.- Parameters:
id- The string identifiermode- The collection mode- Returns:
- A new collector ID
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-