Record Class RegularSerializableDataset

java.lang.Object
java.lang.Record
de.bsvrz.ars.ars.persistence.writer.RegularSerializableDataset
Record Components:
archiveTime - Archivzeit
dataTime - Datenzeit
dataIndex - Datenindex
serializedData - Serialisierte Daten (nur Nutzdaten, ohne Zeitstempel etc.)
uncompressedSize - Unkomprimierte originale Größe oder ContainerFile.NOT_COMPRESSED, falls nicht komprimiert.
isAlreadyCompressed - Sind die Daten schon komprimiert?
All Implemented Interfaces:
SerializableDataset

public record RegularSerializableDataset(long archiveTime, long dataTime, long dataIndex, byte[] serializedData, int uncompressedSize, boolean isAlreadyCompressed) extends Record implements SerializableDataset
Einfache SerializableDataset-Implementierung.
  • Constructor Details

    • RegularSerializableDataset

      public RegularSerializableDataset(long archiveTime, long dataTime, long dataIndex, byte[] serializedData)
      Einfache SerializableDataset-Implementierung. Konstruktor ohne Komprimierung.
      Parameters:
      archiveTime - Archivzeit
      dataTime - Datenzeit
      dataIndex - Datenindex
      serializedData - Serialisierte Daten (nur Nutzdaten, ohne Zeitstempel etc.)
    • RegularSerializableDataset

      public RegularSerializableDataset(long archiveTime, long dataTime, long dataIndex, @NotNull byte[] serializedData, int uncompressedSize, boolean isAlreadyCompressed)
      Creates an instance of a RegularSerializableDataset record class.
      Parameters:
      archiveTime - the value for the archiveTime record component
      dataTime - the value for the dataTime record component
      dataIndex - the value for the dataIndex record component
      serializedData - the value for the serializedData record component
      uncompressedSize - the value for the uncompressedSize record component
      isAlreadyCompressed - the value for the isAlreadyCompressed record component
  • Method Details

    • dataState

      @NotNull public de.bsvrz.dav.daf.main.DataState dataState()
      Description copied from interface: SerializableDataset
      Gibt den Zustand des Datensatzes zurück.
      Specified by:
      dataState in interface SerializableDataset
      Returns:
      den Zustand des Datensatzes
    • estimateMemoryUsage

      public long estimateMemoryUsage()
      Description copied from interface: SerializableDataset
      Schätz den Speicherverbrauch dieses Objekts
      Specified by:
      estimateMemoryUsage in interface SerializableDataset
      Returns:
      Speicherverbrauch in Bytes
    • originalData

      public de.bsvrz.dav.daf.main.Data originalData()
      Description copied from interface: SerializableDataset
      Gibt den ursprünglichen empfangenen Dateninhalt zurück. Der Wert kann null sein und ist nur vorhanden, wenn die Daten vorher vom Datenverteiler empfangen wurden. Dies wird nur für die Quittierung benötigt.
      Specified by:
      originalData in interface SerializableDataset
      Returns:
      Originaler Datensatz
    • toString

      public 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.
    • archiveTime

      public long archiveTime()
      Returns the value of the archiveTime record component.
      Specified by:
      archiveTime in interface SerializableDataset
      Returns:
      the value of the archiveTime record component
    • dataTime

      public long dataTime()
      Returns the value of the dataTime record component.
      Specified by:
      dataTime in interface SerializableDataset
      Returns:
      the value of the dataTime record component
    • dataIndex

      public long dataIndex()
      Returns the value of the dataIndex record component.
      Specified by:
      dataIndex in interface SerializableDataset
      Returns:
      the value of the dataIndex record component
    • serializedData

      @NotNull public byte[] serializedData()
      Returns the value of the serializedData record component.
      Specified by:
      serializedData in interface SerializableDataset
      Returns:
      the value of the serializedData record component
    • uncompressedSize

      public int uncompressedSize()
      Returns the value of the uncompressedSize record component.
      Specified by:
      uncompressedSize in interface SerializableDataset
      Returns:
      the value of the uncompressedSize record component
    • isAlreadyCompressed

      public boolean isAlreadyCompressed()
      Returns the value of the isAlreadyCompressed record component.
      Returns:
      the value of the isAlreadyCompressed record component