Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Redis

You're reading from   Learning Redis Design efficient web and business solutions with Redis

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781783980123
Length 318 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Vinoo Das Vinoo Das
Author Profile Icon Vinoo Das
Vinoo Das
Arrow right icon
View More author details
Toc

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 $19.99/month. Cancel anytime