Skip to content

Commit

Permalink
Removes the replay flag from the operations
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Sep 26, 2023
1 parent 160c272 commit 30f76a4
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private List<String> generateOperationArgs(LanguageWriter file, OperationSummary
List<String> opArgs = new LinkedList<>();
opArgs.add(op.getName().toUpperCase() + "_OP_NUMBER");
opArgs.add(initNewLine + "new " + generator.createElementType(file, StdStrings.MAL, null, StdStrings.IDENTIFIER) + "(\"" + op.getName() + "\")");
opArgs.add(initNewLine + "" + op.getReplay());
// opArgs.add(initNewLine + "" + op.getReplay());
opArgs.add(initNewLine + "new " + generator.createElementType(file, StdStrings.MAL, null, StdStrings.USHORT) + "(" + op.getSet() + ")");

switch (op.getPattern()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public class MALInvokeOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param invokeStage The stage information for the INVOKE stage.
* @param invokeAckStage The stage information for the INVOKE_ACK stage.
Expand All @@ -75,13 +73,12 @@ public class MALInvokeOperation extends MALOperation {
*/
public MALInvokeOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] invokeStage,
final OperationField[] invokeAckStage,
final OperationField[] invokeResponseStage)
throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.INVOKE, capabilitySet);
super(number, name, InteractionType.INVOKE, capabilitySet);

this.invokeStage = invokeStage;
this.invokeAckStage = invokeAckStage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public abstract class MALOperation {

private final Identifier name;
private final UShort number;
private final Boolean replayable;
private final InteractionType interactionType;
private final UShort capabilitySet;
private MALService service;
Expand All @@ -43,28 +42,23 @@ public abstract class MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param interactionType Interaction type of the operation
* @param capabilitySet Capability set of the operation.
* @throws java.lang.IllegalArgumentException If any argument is null.
*/
public MALOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final InteractionType interactionType,
final UShort capabilitySet)
throws java.lang.IllegalArgumentException {
if ((number == null)
|| (name == null)
|| (replayable == null)
|| (interactionType == null)
|| (capabilitySet == null)) {
throw new IllegalArgumentException("Supplied arguments must not be NULL");
}
this.name = name;
this.number = number;
this.replayable = replayable;
this.interactionType = interactionType;
this.capabilitySet = capabilitySet;
}
Expand Down Expand Up @@ -106,15 +100,6 @@ public boolean isPubSub() {
return interactionType == InteractionType.PUBSUB;
}

/**
* Returns whether the operation is replayable.
*
* @return Whether the operation is replayable.
*/
public Boolean isReplayable() {
return replayable;
}

/**
* Returns the operation service.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public class MALProgressOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param progressStage The stage information for the PROGRESS stage.
* @param progressAckStage The stage information for the PROGRESS_ACK stage.
Expand All @@ -87,13 +85,12 @@ public class MALProgressOperation extends MALOperation {
*/
public MALProgressOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] progressStage,
final OperationField[] progressAckStage,
final OperationField[] progressUpdateStage,
final OperationField[] progressResponseStage) throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.PROGRESS, capabilitySet);
super(number, name, InteractionType.PROGRESS, capabilitySet);

this.progressStage = progressStage;
this.progressAckStage = progressAckStage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ public class MALPubSubOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param fields PUB-SUB fields. transmitted by the PUBLISH/NOTIFY message
* of a PUBLISH-SUBSCRIBE operation.
Expand All @@ -159,11 +157,10 @@ public class MALPubSubOperation extends MALOperation {
*/
public MALPubSubOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] fields)
throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.PUBSUB, capabilitySet);
super(number, name, InteractionType.PUBSUB, capabilitySet);

OperationField[] publishFields = new OperationField[fields.length + 1];
OperationField[] notifyFields = new OperationField[fields.length + 2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ public class MALRequestOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param requestStage The stage information for the REQUEST stage.
* @param responseStage The stage information for the REQUEST_RESPONSE
Expand All @@ -66,12 +64,11 @@ public class MALRequestOperation extends MALOperation {
*/
public MALRequestOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] requestStage,
final OperationField[] responseStage)
throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.REQUEST, capabilitySet);
super(number, name, InteractionType.REQUEST, capabilitySet);

this.requestStage = requestStage;
this.responseStage = responseStage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,17 @@ public class MALSendOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param sendStage The stage information for the SEND stage.
* @throws java.lang.IllegalArgumentException If any argument is null,
* except the operation stage arguments.
*/
public MALSendOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] sendStage)
throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.SEND, capabilitySet);
super(number, name, InteractionType.SEND, capabilitySet);
this.sendStage = sendStage;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,17 @@ public class MALSubmitOperation extends MALOperation {
*
* @param number Number of the operation.
* @param name Name of the operation.
* @param replayable Boolean that indicates whether the operation is
* replayable or not
* @param capabilitySet Capability set of the operation.
* @param submitStage The stage information for the SUBMIT stage.
* @throws java.lang.IllegalArgumentException If any argument is null,
* except the operation stage arguments.
*/
public MALSubmitOperation(final UShort number,
final Identifier name,
final Boolean replayable,
final UShort capabilitySet,
final OperationField[] submitStage)
throws java.lang.IllegalArgumentException {
super(number, name, replayable, InteractionType.SUBMIT, capabilitySet);
super(number, name, InteractionType.SUBMIT, capabilitySet);

this.submitStage = submitStage;
}
Expand Down

0 comments on commit 30f76a4

Please sign in to comment.