Record Class RpcDatasourceMeta

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.datasource.RpcDatasourceMeta

public record RpcDatasourceMeta(String name, String description, String problemDescription, String validationQuery, int activeConnections, int maxConnections, String status, String extendedStatus, double statistics, String vendor) extends Record
To optimize transmission of across rpc, this class passes a subset of info from DatasourceMeta. Specifically only the properties used in AbstractDBUtilities.toDataset(List)

The optimization avoids sending complex objects, reducing the size of the payload, and reducing serialization time.
  • Constructor Details

    • RpcDatasourceMeta

      public RpcDatasourceMeta(String name, String description, String problemDescription, String validationQuery, int activeConnections, int maxConnections, String status, String extendedStatus, double statistics, String vendor)
      Creates an instance of a RpcDatasourceMeta record class.
      Parameters:
      name - the value for the name record component
      description - the value for the description record component
      problemDescription - the value for the problemDescription record component
      validationQuery - the value for the validationQuery record component
      activeConnections - the value for the activeConnections record component
      maxConnections - the value for the maxConnections record component
      status - the value for the status record component
      extendedStatus - the value for the extendedStatus record component
      statistics - the value for the statistics record component
      vendor - the value for the vendor record component
  • Method Details

    • fromDatasourceMeta

      public static RpcDatasourceMeta fromDatasourceMeta(DatasourceMeta datasource)
    • toString

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • problemDescription

      public String problemDescription()
      Returns the value of the problemDescription record component.
      Returns:
      the value of the problemDescription record component
    • validationQuery

      public String validationQuery()
      Returns the value of the validationQuery record component.
      Returns:
      the value of the validationQuery record component
    • activeConnections

      public int activeConnections()
      Returns the value of the activeConnections record component.
      Returns:
      the value of the activeConnections record component
    • maxConnections

      public int maxConnections()
      Returns the value of the maxConnections record component.
      Returns:
      the value of the maxConnections record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • extendedStatus

      public String extendedStatus()
      Returns the value of the extendedStatus record component.
      Returns:
      the value of the extendedStatus record component
    • statistics

      public double statistics()
      Returns the value of the statistics record component.
      Returns:
      the value of the statistics record component
    • vendor

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