Package org.yamcs.yarch.rocksdb
Class RdbTagDb
java.lang.Object
org.yamcs.yarch.rocksdb.RdbTagDb
- All Implemented Interfaces:
TagDb
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close the database and release resources the object is unusable after this call.deleteTag
(long tagTime, int tagId) Deletes the specified taggetTag
(long tagTime, int tagId) Returns a specific tag, or null if the requested tag does not existvoid
getTags
(TimeInterval intv, TagReceiver receiver) Synchonously gets tags, passing every separate one to the providedTagReceiver
.Inserts a new Tag.updateTag
(long tagTime, int tagId, Yamcs.ArchiveTag tag) Updates an existing tag.
-
Method Details
-
getTags
Synchonously gets tags, passing every separate one to the providedTagReceiver
.- Specified by:
getTags
in interfaceTagDb
- Throws:
IOException
-
getTag
Returns a specific tag, or null if the requested tag does not exist- Specified by:
getTag
in interfaceTagDb
- Throws:
IOException
-
insertTag
Inserts a new Tag. No id should be specified. If it is, it will silently be overwritten, and the new tag will be returned.- Specified by:
insertTag
in interfaceTagDb
- Throws:
IOException
-
updateTag
public Yamcs.ArchiveTag updateTag(long tagTime, int tagId, Yamcs.ArchiveTag tag) throws YamcsException, IOException Updates an existing tag. The tag is fetched by the specified id throws YamcsException if the tag could not be found.Note that both tagId and oldTagStart need to be specified so that a direct lookup in the internal data structure can be made.
- Specified by:
updateTag
in interfaceTagDb
- Returns:
- the updated tag
- Throws:
YamcsException
IOException
-
deleteTag
Deletes the specified tag- Specified by:
deleteTag
in interfaceTagDb
- Throws:
YamcsException
- if the id was invalid, or if the tag could not be foundIOException
-
close
public void close()Description copied from interface:TagDb
close the database and release resources the object is unusable after this call.
-