com.vaadin.signals.impl.
Class SynchronousSignalTree
A signal tree that immediately confirms commands without waiting for an
external system to determine command ordering. This means that
confirmed()
and submitted()
return the same value. This
type of tree is intended for signals that are used only within a single JVM.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.signals.impl.SignalTree
SignalTree.PendingCommit, SignalTree.Type
-
Constructor Summary
ConstructorsConstructorDescriptionSynchronousSignalTree
(boolean computedSignal) Creates a new synchronous signal tree.
-
Method Summary
Modifier and TypeMethodDescriptionGets the current snapshot based on all confirmed commands.
prepareCommit
(CommandsAndHandlers changes) Starts the process of committing a set of changes.
Gets the current snapshot based on all confirmed and submitted commands.
Methods inherited from class com.vaadin.signals.impl.SignalTree
commitSingleCommand, commitSingleCommand, getLock, getWithLock, hasLock, id, notifyObservers, notifyProcessedCommandSubscribers, observeNextChange, runWithLock, subscribeToProcessed, type, wrapWithLock
-
Constructor Details
-
SynchronousSignalTree
public SynchronousSignalTree(boolean computedSignal) Creates a new synchronous signal tree.
Parameters:
computedSignal
-true
if the tree is used for backing a computed signal,false
if it's a standalone tree
-
-
Method Details
-
confirmed
Description copied from class:
SignalTree
Gets the current snapshot based on all confirmed commands. This snapshot does not contain changes from commands that have been submitted but not yet confirmed.
Specified by:
confirmed
in classSignalTree
Returns:
the confirmed snapshot, not
null
-
submitted
Description copied from class:
SignalTree
Gets the current snapshot based on all confirmed and submitted commands.
Specified by:
submitted
in classSignalTree
Returns:
the submitted snapshot, not
null
-
prepareCommit
Description copied from class:
SignalTree
Starts the process of committing a set of changes. The returned instance defines callbacks for continuing the commit procedure.
Note that this method expects that the caller has acquired the tree lock prior to calling the method and that the lock will remain acquired while interacting with the returned object.
Specified by:
prepareCommit
in classSignalTree
Parameters:
changes
- the changes to commit, notnull
Returns:
callbacks for coordinating the rest of the commit sequence, not
null
-