Interface IHomeLayout


public interface IHomeLayout
The home layout manages all running worker processes if any. Worker processes can be started by simply _preparing_ (see IDependencyComponent) a worker process component.

This interface allows to send messages to worker processes from the home process. It is hence mostly used internally and should not be used be applications.

See HomeHandle for a worker process perspective onto the running home layout.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    broadcast scope: local home process
    static int
    broadcast scope: All of the home layout
    static int
    broadcast scope: exclude the sending worker process
    static int
    broadcast scope: all worker processes in home
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    broadcastInvalidations​(Collection<String> invs, long timeout, int scope, String senderWorker)
    broadcast resource invalidations to all worker processes of a home and, if specified, to all homes and workers in a cluster.
    void
    broadcastMessage​(Map<String,​Serializable> args, long timeout)
    broadcast a message to all worker processes of a home.
    void
    broadcastMessage​(Map<String,​Serializable> args, long timeout, boolean killOnTimeOut)
    broadcast a message to all worker processes of a home
    get()
    Retrieve the home layout instance
  • Field Details

    • SCOPE_HOME

      static final int SCOPE_HOME
      broadcast scope: local home process
      See Also:
      Constant Field Values
    • SCOPE_WORKERS

      static final int SCOPE_WORKERS
      broadcast scope: all worker processes in home
      See Also:
      Constant Field Values
    • SCOPE_OTHERS

      static final int SCOPE_OTHERS
      broadcast scope: exclude the sending worker process
      See Also:
      Constant Field Values
    • SCOPE_HOME_LAYOUT

      static final int SCOPE_HOME_LAYOUT
      broadcast scope: All of the home layout
      See Also:
      Constant Field Values
  • Method Details

    • get

      static IHomeLayout get()
      Retrieve the home layout instance
    • broadcastMessage

      void broadcastMessage(Map<String,​Serializable> args, long timeout) throws IOException
      broadcast a message to all worker processes of a home. Timeouts will result in exceptions
      Parameters:
      args -
      timeout - timeout per worker or -1 for default
      Throws:
      IOException
    • broadcastMessage

      void broadcastMessage(Map<String,​Serializable> args, long timeout, boolean killOnTimeOut) throws IOException
      broadcast a message to all worker processes of a home
      Parameters:
      args -
      timeout - timeout per worker or -1 for default
      killOnTimeOut - if true a time out will lead to a worker process termination.
      Throws:
      IOException
    • broadcastInvalidations

      void broadcastInvalidations(Collection<String> invs, long timeout, int scope, String senderWorker) throws IOException
      broadcast resource invalidations to all worker processes of a home and, if specified, to all homes and workers in a cluster. Invalidations will be processed on the home process as well and before distribution to worker processes.
      Parameters:
      args -
      timeout - timeout per worker or -1 for default
      Throws:
      IOException