public final class KeyValueDataList extends KeyValueData implements Serializable, Iterable<KeyValueData>
Once a client submits an instance of KeyValueDataList for publication on the status bus,
it logically belongs to the framework and should no longer be used or updated by the client.
Contrary to what one might expect, the list key you supply when making a KeyValueDataList is not encoded and so doesn't appear in trending. For example if in a subsystem whose name on the buses is "subsys" you choose a list key of "foo" and add a list item with a key of "bar", the item will appear in trending under the path "subsys/bar" and not as "subsys/foo/bar". In order to get the latter you must use an item key of "foo/bar". This behavior was coded at a time when full hierarchical path names were not used in trending and the writers of the filter changer subsystem wished to use the master key as a kind of message type tag.
KeyValueData.KeyValueDataTypeneedsEncoding| Constructor and Description |
|---|
KeyValueDataList()
Create a KeyValueDataList without a key or a timestamp.
|
KeyValueDataList(org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
Create a KeyValueDataList with a ccs time stamp.
|
KeyValueDataList(Map<String,Serializable> attributes)
Create a KeyValueDataList with attributes.
|
KeyValueDataList(String key)
Create a KeyValueDataList with a key.
|
KeyValueDataList(String key,
org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
Create a KeyValueDataList with a key and a time stamp.
|
KeyValueDataList(String key,
org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp,
Map<String,Serializable> attributes)
Create a KeyValueDataList with a key and a time stamp.
|
KeyValueDataList(String key,
Map<String,Serializable> attributes)
Create a KeyValueDataList with a key.The time stamp is by default the object creation time.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addData(KeyValueData data)
Add a KeyValueData object to the KeyValueDataList.
|
void |
addData(String key,
Serializable value)
Add a key-value pair to this KeyValueDataList by assigning it the timestamp of the KeyDataList.
|
void |
addData(String key,
Serializable value,
org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
Add a key-value pair with a CCS timestamp to this KeyValueDataList.
|
void |
addData(String key,
Serializable value,
org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp,
KeyValueData.KeyValueDataType type)
Add a key-value pair with a CCS timestamp to this KeyValueDataList.
|
void |
addData(String key,
Serializable value,
KeyValueData.KeyValueDataType type)
Add a key-value pair to this KeyValueDataList by assigning it the timestamp of the KeyDataList.
|
Serializable |
getAttribute(String name)
Get the value of the provided attribute name.
|
Map<String,Serializable> |
getAttributes()
Get all the data attributes.
|
List<KeyValueData> |
getListOfKeyValueData()
Get the list of KeyValueData contained in this object.
|
List<KeyValueData> |
getListOfKeyValueData(KeyValueData.KeyValueDataType type)
Get the list of KeyValueData contained in this object for a given type.
|
Iterator<KeyValueData> |
iterator() |
String |
toString() |
getCCSTimeStamp, getKey, getType, getValue, needsEncoding, updateNeedsEncodingclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic KeyValueDataList()
List<KeyValueData>public KeyValueDataList(Map<String,Serializable> attributes)
List<KeyValueData>attributes - The Map of attributespublic KeyValueDataList(String key)
List<KeyValueData>key - The list's key. See the remarks about this key in the class description.public KeyValueDataList(String key, Map<String,Serializable> attributes)
List<KeyValueData>key - The list's key. See the remarks about this key in the class description.attributes - The Map of attributespublic KeyValueDataList(String key, org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
List<KeyValueData>key - The list's key. See the remarks about this key in the class description.ccsTimeStamp - The key-value pair ccsTimeStamp.public KeyValueDataList(String key, org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp, Map<String,Serializable> attributes)
List<KeyValueData>key - The list's key. See the remarks about this key in the class description.ccsTimeStamp - The key-value pair ccsTimeStamp.attributes - The Map of attributespublic KeyValueDataList(org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
List<KeyValueData>ccsTimeStamp - The key-value pair ccs timestamp.public Serializable getAttribute(String name)
name - The name of the attributepublic Map<String,Serializable> getAttributes()
public void addData(String key, Serializable value)
key - The key of the pair.value - The value of the pair.public void addData(String key, Serializable value, KeyValueData.KeyValueDataType type)
key - The key of the pair.value - The value of the pair.type - The type of the KeyValueData to add.public void addData(String key, Serializable value, org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp)
key - The key of the pair.value - The value of the pair.ccsTimeStamp - The ccsTimeStamp associated to the pair.public void addData(String key, Serializable value, org.lsst.ccs.utilities.taitime.CCSTimeStamp ccsTimeStamp, KeyValueData.KeyValueDataType type)
key - The key of the pair.value - The value of the pair.ccsTimeStamp - The CCS timestamp associated to the pair.type - The type of the KeyValueData to add.public List<KeyValueData> getListOfKeyValueData()
public List<KeyValueData> getListOfKeyValueData(KeyValueData.KeyValueDataType type)
type - The KeyValueDataType for which the data is required.public void addData(KeyValueData data)
data - The KeyValueData object to add to the KeyValueDataList.public Iterator<KeyValueData> iterator()
iterator in interface Iterable<KeyValueData>public String toString()
toString in class KeyValueDataCopyright © 2022 LSST. All rights reserved.