Class MachineSnapshot

java.lang.Object
xal.service.pvlogger.MachineSnapshot

public class MachineSnapshot extends Object
MachineSnapshot is a representation of the data for a snapshot of the machine state at some point in time.
Author:
tap
  • Field Details

    • TIME_FORMAT

      protected static final DateFormat TIME_FORMAT
    • id

      protected long id
    • timestamp

      protected Date timestamp
    • channelSnapshots

      protected ChannelSnapshot[] channelSnapshots
    • type

      protected String type
    • comment

      protected String comment
  • Constructor Details

    • MachineSnapshot

      public MachineSnapshot(long id, String type, Date timestamp, String comment, ChannelSnapshot[] channelSnapshots)
      Primary constructor.
      Parameters:
      id - The unique identifier of this instance in the persistent storage.
      type - Identifies the type of machine snapshot
      timestamp - The timestamp when the snapshot was taken.
      comment - A comment about this snapshot.
      channelSnapshots - The channel snapshots associated with this machine snapshot.
    • MachineSnapshot

      public MachineSnapshot(long id, Date timestamp, String comment, ChannelSnapshot[] channelSnapshots)
      Primary constructor.
      Parameters:
      id - The unique identifier of this instance in the persistent storage.
      timestamp - The timestamp when the snapshot was taken.
      comment - A comment about this snapshot.
      channelSnapshots - The channel snapshots associated with this machine snapshot.
    • MachineSnapshot

      public MachineSnapshot(Date timestamp, String comment, ChannelSnapshot[] channelSnapshots)
      Constructor.
      Parameters:
      timestamp - The timestamp when the snapshot was taken.
      comment - A comment about this snapshot.
      channelSnapshots - The channel snapshots associated with this machine snapshot.
    • MachineSnapshot

      public MachineSnapshot(int channelCount)
      Constructor of a MachineSnapshot with no data. Placeholders for channel snapshots are constructed.
      Parameters:
      channelCount - The number of channel placeholders to make.
  • Method Details

    • setChannelSnapshot

      public void setChannelSnapshot(int index, ChannelSnapshot channelSnapshot)
      Set the channel snapshot for the specified index.
      Parameters:
      index - The index identifying the channel snapshot placeholder
      channelSnapshot - The channel snapshot to associate with this machine snapshot.
    • getChannelSnapshots

      public ChannelSnapshot[] getChannelSnapshots()
      Get the channel snapshots.
      Returns:
      The array of channel snapshots.
    • getChannelCount

      public int getChannelCount()
      Get the number of channel snapshot placeholders.
      Returns:
      the number of channel snapshot placeholders.
    • getId

      public long getId()
      Get the unique identifier of this machine snapshot.
      Returns:
      The unique identifier of this machine snapshot.
    • setId

      public void setId(long id)
      Set the unique identifier of this machine snapshot.
      Parameters:
      id - The unique identifier to use for this machine snapshot
    • getType

      public String getType()
      Get the group id which identifies the type of machine snapshot
      Returns:
      the group id identifying the type of snapshot
    • setType

      public void setType(String type)
      Set the group id identifying the type of snapshot
      Parameters:
      type - type of snapshot
    • getComment

      public String getComment()
      Get the comment.
      Returns:
      the comment assigned to this machine snapshot.
    • setComment

      public void setComment(String comment)
      Set the comment.
      Parameters:
      comment - The comment to assign to this machine snapshot.
    • getTimestamp

      public Date getTimestamp()
      Get the timestamp.
      Returns:
      The time when this machine snapshot was taken.
    • toString

      public String toString()
      Override toString() to get a textual description of the machine snapshot.
      Overrides:
      toString in class Object
      Returns:
      a textual description of the machine snapshot.