Package io.pravega.client.state
Interface Update<StateT extends Revisioned>
-
- Type Parameters:
StateT
- The type of the object being updated
- All Known Subinterfaces:
InitialUpdate<StateT>
public interface Update<StateT extends Revisioned>
An update to a StateT object coordinated via aStateSynchronizer
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StateT
applyTo(StateT oldState, Revision newRevision)
Return an object of type StateT that is the same as oldState with this update applied to it.
-
-
-
Method Detail
-
applyTo
StateT applyTo(StateT oldState, Revision newRevision)
Return an object of type StateT that is the same as oldState with this update applied to it. InvokingRevisioned.getRevision()
on the result should return newRevision.- Parameters:
oldState
- The state to which should be used as the basis for the new state.newRevision
- The revision for the new state.- Returns:
- A state that represents a state with this update applied to it. (If StateT is mutable and the update is done in-place this is the same object as oldState)
-
-