Package com.vaadin.collaborationengine
Interface Backend
-
- All Known Implementing Classes:
LocalBackend
public interface Backend
The interface between a cluster backend and Collaboration Engine.- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Backend.EventLog
A strictly ordered log of submitted events.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Backend.EventLog
getMembershipEventLog()
Get the event log of this backend node membership events.UUID
getNodeId()
Gets the unique identifier of this backend node.CompletableFuture<com.fasterxml.jackson.databind.node.ObjectNode>
loadLatestSnapshot(String name)
Backend.EventLog
openEventLog(String logId)
Opens an event log with the given id.void
submitSnapshot(String name, com.fasterxml.jackson.databind.node.ObjectNode snapshot)
-
-
-
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 untilBackend.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, notnull
- 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)
-
-