Package io.pravega.client.state
Interface InitialUpdate<StateT extends Revisioned>
-
- Type Parameters:
StateT
- A revisioned object that updates to are coordinated with aStateSynchronizer
.
- All Superinterfaces:
Update<StateT>
public interface InitialUpdate<StateT extends Revisioned> extends Update<StateT>
A constructor for a StateT object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default StateT
applyTo(StateT oldState, Revision newRevision)
Return an object of type StateT that is the same as oldState with this update applied to it.StateT
create(java.lang.String scopedStreamName, Revision revision)
Returns an object of type StateT with the provided revision.
-
-
-
Method Detail
-
create
StateT create(java.lang.String scopedStreamName, Revision revision)
Returns an object of type StateT with the provided revision.- Parameters:
scopedStreamName
- The name of the stream that this state is associated with.revision
- The revision to use- Returns:
- A revisioned state object
-
applyTo
default StateT applyTo(StateT oldState, Revision newRevision)
Description copied from interface:Update
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.- Specified by:
applyTo
in interfaceUpdate<StateT extends Revisioned>
- 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)
-
-