Class RdbProtobufDatabase

    • Method Detail

      • save

        public void save​(String id,
                         com.google.protobuf.Message message)
                  throws IOException
        Description copied from interface: ProtobufDatabase
        Save a protobuf message. If a message is already saved under the given id, it is overwritten.
        Specified by:
        save in interface ProtobufDatabase
        Parameters:
        id - the identifier
        message - 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: ProtobufDatabase
        Retrieves a protobuf message for a specific id.
        Specified by:
        get in interface ProtobufDatabase
        Parameters:
        id - the identifier to search for
        messageClass - the expected message class
        Returns:
        the found message, or null
        Throws:
        IOException
      • delete

        public boolean delete​(String id)
                       throws IOException
        Description copied from interface: ProtobufDatabase
        Delete a protobuf message for a specific id.
        Specified by:
        delete in interface ProtobufDatabase
        Parameters:
        id - the identifier to search for
        Returns:
        whether a record was found and deleted.
        Throws:
        IOException