public class MachineSnapshot
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChannelSnapshot[] |
_channelSnapshots |
protected java.lang.String |
_comment |
protected long |
_id |
protected java.util.Date |
_timestamp |
protected java.lang.String |
_type |
protected static java.text.DateFormat |
TIME_FORMAT |
Constructor and Description |
---|
MachineSnapshot(java.util.Date timestamp,
java.lang.String comment,
ChannelSnapshot[] channelSnapshots)
Constructor.
|
MachineSnapshot(int channelCount)
Constructor of a MachineSnapshot with no data.
|
MachineSnapshot(long id,
java.util.Date timestamp,
java.lang.String comment,
ChannelSnapshot[] channelSnapshots)
Primary constructor.
|
MachineSnapshot(long id,
java.lang.String type,
java.util.Date timestamp,
java.lang.String comment,
ChannelSnapshot[] channelSnapshots)
Primary constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getChannelCount()
Get the number of channel snapshot placeholders.
|
ChannelSnapshot[] |
getChannelSnapshots()
Get the channel snapshots.
|
java.lang.String |
getComment()
Get the comment.
|
long |
getId()
Get the unique identifier of this machine snapshot.
|
java.util.Date |
getTimestamp()
Get the timestamp.
|
java.lang.String |
getType()
Get the group id which identifies the type of machine snapshot
|
void |
setChannelSnapshot(int index,
ChannelSnapshot channelSnapshot)
Set the channel snapshot for the specified index.
|
void |
setComment(java.lang.String comment)
Set the comment.
|
void |
setId(long id)
Set the unique identifier of this machine snapshot.
|
void |
setType(java.lang.String type)
Set the group id identifying the type of snapshot
|
java.lang.String |
toString()
Override toString() to get a textual description of the machine snapshot.
|
protected static final java.text.DateFormat TIME_FORMAT
protected long _id
protected java.util.Date _timestamp
protected ChannelSnapshot[] _channelSnapshots
protected java.lang.String _type
protected java.lang.String _comment
public MachineSnapshot(long id, java.lang.String type, java.util.Date timestamp, java.lang.String comment, ChannelSnapshot[] channelSnapshots)
id
- The unique identifier of this instance in the persistent storage.type
- Identifies the type of machine snapshottimestamp
- The timestamp when the snapshot was taken.comment
- A comment about this snapshot.channelSnapshots
- The channel snapshots associated with this machine snapshot.public MachineSnapshot(long id, java.util.Date timestamp, java.lang.String comment, ChannelSnapshot[] channelSnapshots)
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.public MachineSnapshot(java.util.Date timestamp, java.lang.String comment, ChannelSnapshot[] channelSnapshots)
timestamp
- The timestamp when the snapshot was taken.comment
- A comment about this snapshot.channelSnapshots
- The channel snapshots associated with this machine snapshot.public MachineSnapshot(int channelCount)
channelCount
- The number of channel placeholders to make.public void setChannelSnapshot(int index, ChannelSnapshot channelSnapshot)
index
- The index identifying the channel snapshot placeholderchannelSnapshot
- The channel snapshot to associate with this machine snapshot.public ChannelSnapshot[] getChannelSnapshots()
public int getChannelCount()
public long getId()
public void setId(long id)
id
- The unique identifier to use for this machine snapshotpublic java.lang.String getType()
public void setType(java.lang.String type)
type
- type of snapshotpublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment to assign to this machine snapshot.public java.util.Date getTimestamp()
public java.lang.String toString()
toString
in class java.lang.Object