Class IdMapOperation
java.lang.Object
net.messagevortex.router.operation.AbstractOperation
net.messagevortex.router.operation.IdMapOperation
- All Implemented Interfaces:
Serializable,Operation
This is a dummy operation mainly for testing it maps output to input ids.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIdMapOperation(int sourceId, int targetId, int number) Creates a simple operation mapping the input to the output ID. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRun()Checks if all prerequisiting fields do exist or can be provided by a subsequent operation.int[]execute(int[] id) Executes the operation and sets at least the provided set of id.int[]Gets all ids which are required to execute this operation.int[]Gets all ids which are written by this operation.toString()Methods inherited from class net.messagevortex.router.operation.AbstractOperation
getIdentity, getUsagePeriod, isInUsagePeriod, setInternalPayload, setUsagePeriod
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
IdMapOperation
public IdMapOperation(int sourceId, int targetId, int number) Creates a simple operation mapping the input to the output ID.
- Parameters:
sourceId- the first source ID to be mappedtargetId- the first target ID to be mappednumber- the number of subsequent blocks to be mapped
-
-
Method Details
-
getOutputId
public int[] getOutputId()Description copied from interface:OperationGets all ids which are written by this operation.
- Specified by:
getOutputIdin interfaceOperation- Returns:
- array representing all ids which will be potentially set by this operation
-
getInputId
public int[] getInputId()Description copied from interface:OperationGets all ids which are required to execute this operation.
- Specified by:
getInputIdin interfaceOperation- Returns:
- array representing all ids which will be potentially set by this operation
-
canRun
public boolean canRun()Description copied from interface:OperationChecks if all prerequisiting fields do exist or can be provided by a subsequent operation.
- Specified by:
canRunin interfaceOperation- Specified by:
canRunin classAbstractOperation- Returns:
- true if all prerequisits can potentially be satisfied
-
execute
public int[] execute(int[] id) Description copied from interface:OperationExecutes the operation and sets at least the provided set of id.
This operation might trigger to execute prerequisiting operations.
- Specified by:
executein interfaceOperation- Specified by:
executein classAbstractOperation- Parameters:
id- the namespace id to be set minimally- Returns:
- array representing all ids which have been set
-
toString
-