Interface Node


public interface Node
Represents the worker node for a single Application. This is a simple interface which in and of itself does nothing more than provide a means to start and stop the service. Conceptually, however, a Node represents the core functionality for a given Application, e.g. resource management, task management--generally everything related to Application logic execution. Additionally the node itself is responsible for opening and maintaining the connection. The logic housed in the node will receive incoming messages and dispatch them to local services.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Allows for the creation of Node instances on-the-fly.
    static interface 
    Represents a pending node shut-down process.
    static interface 
    Represents a pending node start-up process.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Designates a master/control Node.
    static final String
    An indicator of the Node's name to be used with the Named annotation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Begins the shutdown process.
    Begins the startup process by returning an instance of Node.Startup.
    Gets the symbolic name of the node.
    dev.getelements.elements.sdk.cluster.id.NodeId
    Gets the NodeId
    Gets the state of the node.
  • Field Details

    • NAME

      static final String NAME
      An indicator of the Node's name to be used with the Named annotation.
      See Also:
    • MASTER_NODE_NAME

      static final String MASTER_NODE_NAME
      Designates a master/control Node. Each Instance has a master Node that handles the basic services required to operate the Node. This is used in conjunction with the Named annotation and not the getName() method.
      See Also:
  • Method Details

    • getName

      String getName()
      Gets the symbolic name of the node. This can be assigned by the container or assigned in configuration. It should be human readable, and should be unique per Instance. Used just for symbolic naming of the Node and in logging.
      Returns:
      the name of the node
    • getNodeId

      dev.getelements.elements.sdk.cluster.id.NodeId getNodeId()
      Gets the NodeId
      Returns:
      the NodeId
    • getState

      NodeState getState()
      Gets the state of the node.
      Returns:
      the NodeState indicating the state of the node.
    • beginStartup

      Node.Startup beginStartup()
      Begins the startup process by returning an instance of Node.Startup.
      Returns:
      the pending Node.Startup object
    • beginShutdown

      Node.Shutdown beginShutdown()
      Begins the shutdown process.
      Returns:
      the Node.Shutdown object