Interface Backend

  • All Known Implementing Classes:
    LocalBackend

    public interface Backend
    The interface between a cluster backend and Collaboration Engine.
    Author:
    Vaadin Ltd
    • Method Detail

      • openEventLog

        Backend.EventLog openEventLog​(String logId)
        Opens an event log with the given id. The returned object can be used to capture any common state related to this particular event log. An actual underlying connection is not needed until Backend.EventLog.subscribe(UUID, BiConsumer)} is invoked, but it is still recommended to make this method fail fast in case it would not be possible to open an actual underlying connection later.
        Parameters:
        logId - the id of the event log to open, not null
        Returns:
        an object representing the event log, not null
      • getMembershipEventLog

        Backend.EventLog getMembershipEventLog()
        Get the event log of this backend node membership events. The returned object can be used to subscribe to events dispatched when a node joins or leaves the backend.
        Returns:
        the object representing the membership event log, not null
      • getNodeId

        UUID getNodeId()
        Gets the unique identifier of this backend node.
        Returns:
        the node id, not null
      • loadLatestSnapshot

        CompletableFuture<com.fasterxml.jackson.databind.node.ObjectNode> loadLatestSnapshot​(String name)
      • submitSnapshot

        void submitSnapshot​(String name,
                            com.fasterxml.jackson.databind.node.ObjectNode snapshot)