Package org.yamcs.yarch
Interface ProtobufDatabase
- All Known Implementing Classes:
RdbProtobufDatabase
public interface ProtobufDatabase
A database that allows to store and retrieve protobuf messages.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Delete a protobuf message for a specific id.<T extends com.google.protobuf.Message>
TRetrieves a protobuf message for a specific id.void
Save a protobuf message.
-
Method Details
-
save
Save a protobuf message. If a message is already saved under the given id, it is overwritten.- Parameters:
id
- the identifiermessage
- the protobuf message- Throws:
IOException
-
get
Retrieves a protobuf message for a specific id.- Parameters:
id
- the identifier to search formessageClass
- the expected message class- Returns:
- the found message, or
null
- Throws:
IOException
-
delete
Delete a protobuf message for a specific id.- Parameters:
id
- the identifier to search for- Returns:
- whether a record was found and deleted.
- Throws:
IOException
-