Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Redis

You're reading from  Learning Redis

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781783980123
Pages 318 pages
Edition 1st Edition
Languages
Author (1):
Vinoo Das Vinoo Das
Profile icon Vinoo Das

Master node commands


The following is a list of commands that can be fired from the master nodes:

  • The start command

  • The status command

  • The get command

  • The msg command

  • The kill command

  • The clone command

  • The 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.

Sequence of flow of data in Start command

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")));
  }
 ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}