Package org.yamcs.yarch.rocksdb
Class RdbProtobufDatabase
java.lang.Object
org.yamcs.yarch.rocksdb.RdbProtobufDatabase
- All Implemented Interfaces:
ProtobufDatabase
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDelete a protobuf message for a specific id.<T extends com.google.protobuf.Message>
TRetrieves a protobuf message for a specific id.voidSave a protobuf message.
-
Method Details
-
save
Description copied from interface:ProtobufDatabaseSave a protobuf message. If a message is already saved under the given id, it is overwritten.- Specified by:
savein interfaceProtobufDatabase- Parameters:
id- the identifiermessage- the protobuf message- Throws:
IOException
-
get
public <T extends com.google.protobuf.Message> T get(String id, Class<T> messageClass) throws IOException Description copied from interface:ProtobufDatabaseRetrieves a protobuf message for a specific id.- Specified by:
getin interfaceProtobufDatabase- Parameters:
id- the identifier to search formessageClass- the expected message class- Returns:
- the found message, or
null - Throws:
IOException
-
delete
Description copied from interface:ProtobufDatabaseDelete a protobuf message for a specific id.- Specified by:
deletein interfaceProtobufDatabase- Parameters:
id- the identifier to search for- Returns:
- whether a record was found and deleted.
- Throws:
IOException
-