Package org.yamcs.yarch.rocksdb
Class RdbTagDb
- java.lang.Object
-
- org.yamcs.yarch.rocksdb.RdbTagDb
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()close the database and release resources the object is unusable after this call.org.yamcs.protobuf.Yamcs.ArchiveTagdeleteTag(long tagTime, int tagId)Deletes the specified tagorg.yamcs.protobuf.Yamcs.ArchiveTaggetTag(long tagTime, int tagId)Returns a specific tag, or null if the requested tag does not existvoidgetTags(TimeInterval intv, TagReceiver receiver)Synchonously gets tags, passing every separate one to the providedTagReceiver.org.yamcs.protobuf.Yamcs.ArchiveTaginsertTag(org.yamcs.protobuf.Yamcs.ArchiveTag tag)Inserts a new Tag.org.yamcs.protobuf.Yamcs.ArchiveTagupdateTag(long tagTime, int tagId, org.yamcs.protobuf.Yamcs.ArchiveTag tag)Updates an existing tag.
-
-
-
Method Detail
-
getTags
public void getTags(TimeInterval intv, TagReceiver receiver) throws IOException
Synchonously gets tags, passing every separate one to the providedTagReceiver.- Specified by:
getTagsin interfaceTagDb- Throws:
IOException
-
getTag
public org.yamcs.protobuf.Yamcs.ArchiveTag getTag(long tagTime, int tagId) throws IOExceptionReturns a specific tag, or null if the requested tag does not exist- Specified by:
getTagin interfaceTagDb- Throws:
IOException
-
insertTag
public org.yamcs.protobuf.Yamcs.ArchiveTag insertTag(org.yamcs.protobuf.Yamcs.ArchiveTag tag) throws IOExceptionInserts 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:
insertTagin interfaceTagDb- Throws:
IOException
-
updateTag
public org.yamcs.protobuf.Yamcs.ArchiveTag updateTag(long tagTime, int tagId, org.yamcs.protobuf.Yamcs.ArchiveTag tag) throws YamcsException, IOExceptionUpdates 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:
updateTagin interfaceTagDb- Returns:
- the updated tag
- Throws:
YamcsExceptionIOException
-
deleteTag
public org.yamcs.protobuf.Yamcs.ArchiveTag deleteTag(long tagTime, int tagId) throws IOException, YamcsExceptionDeletes the specified tag- Specified by:
deleteTagin interfaceTagDb- Throws:
YamcsException- if the id was invalid, or if the tag could not be foundIOException
-
-