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 class
Command.CommandType
Valid command types that are recognized and supported by the command processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Returns the command id.Variant
getPayload()
Returns the custom payload.long
getSeqNo()
Returns the sequence number.Command.CommandType
getType()
Returns the command type.
-
-
-
Constructor Detail
-
Command
public Command(String id, String commandType, Variant payload, long seqNo)
Creates aCommand
object with all fields initialized.- Parameters:
id
- id of the commandscommandType
- the name of the command type which is mapped to one ofCommand.CommandType
valuespayload
- 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
-
-