Master node commands
The following is a list of commands that can be fired from the master nodes:
The
start
commandThe
status
commandThe
get
commandThe
msg
commandThe
kill
commandThe
clone
commandThe
stop
command
Let's take a look at each command from a design and implementation perspective.
The start command
The start
command will start the master node in the gossip server ecosystem. The precondition for executing this command is that the node name should be unique.
The syntax for this command is: start
. The following screenshot shows the response in the shell console:
Implementation of StartMasterCommand
The start
command is implemented as shown here:
package org.redisch7.gossipserver.commands; /* OMITTING THE IMPORT STATEMENTS TO SAVE SPACE */ public class StartMasterCommand extends AbstractCommand { private Validator validator = new Validator(); public StartMasterCommand() { validator.configureTemplate().add((new StringToken("start"))); } ...