public class TransferTokensToParticleGroupsMapper extends java.lang.Object implements StatefulActionToParticleGroupsMapper<TransferTokensAction>
Constructor and Description |
---|
TransferTokensToParticleGroupsMapper() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ParticleGroup> |
mapToParticleGroups(TransferTokensAction transfer,
java.util.stream.Stream<Particle> store)
Creates new particle groups to be added to an atom given a high level
action and application state
|
java.util.Set<ShardedParticleStateId> |
requiredState(TransferTokensAction transfer)
Retrieves the necessary application state to be used in creating new particles
given a high level action.
|
public TransferTokensToParticleGroupsMapper()
public java.util.Set<ShardedParticleStateId> requiredState(TransferTokensAction transfer)
StatefulActionToParticleGroupsMapper
requiredState
in interface StatefulActionToParticleGroupsMapper<TransferTokensAction>
transfer
- the action to get the required context aboutpublic java.util.List<ParticleGroup> mapToParticleGroups(TransferTokensAction transfer, java.util.stream.Stream<Particle> store) throws StageActionException
StatefulActionToParticleGroupsMapper
mapToParticleGroups
in interface StatefulActionToParticleGroupsMapper<TransferTokensAction>
transfer
- the action to mapstore
- particles as requested by requiredState()StageActionException