Class Command
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.commands.queue.Command
-
public class Command extends Object
Representation of the command entity from the command queue table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommand.CommandTypeValid command types that are recognized and supported by the command processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Returns the command id.VariantgetPayload()Returns the custom payload.longgetSeqNo()Returns the sequence number.Command.CommandTypegetType()Returns the command type.
-
-
-
Constructor Detail
-
Command
public Command(String id, String commandType, Variant payload, long seqNo)
Creates aCommandobject with all fields initialized.- Parameters:
id- id of the commandscommandType- the name of the command type which is mapped to one ofCommand.CommandTypevaluespayload- custom optional payload that should match the contract defined by the command typeseqNo- the value by which the commands execution order is defined
-
-
Method Detail
-
getId
public String getId()
Returns the command id.- Returns:
- id of the command
-
getType
public Command.CommandType getType()
Returns the command type.- Returns:
- command type
-
getPayload
public Variant getPayload()
Returns the custom payload.- Returns:
- command custom payload
-
getSeqNo
public long getSeqNo()
Returns the sequence number.- Returns:
- command sequence number
-
-