Documentation of 'org.jgap.distr.Master' Java class
Master
org.jgap.distr

Class Master



  • public abstract class Master
    extends java.lang.Object
    Represents an IMaster instance. Distributes work to IWorker instances. Allows to receive new tasks and send them to the workers when applicable.
    Since:
    2.3
    • Constructor Detail

      • Master

        public Master(RequestDispatcher a_dispatcher,
                      WorkerListener a_workerListener)
               throws java.lang.Exception
        Constructor.
        Parameters:
        a_dispatcher - the dispatcher to use for requests to workers
        a_workerListener - the listener to use for listening to worker messages
        Throws:
        java.lang.Exception
        Since:
        2.4
    • Method Detail

      • start

        public abstract void start()
                            throws java.lang.Exception
        Starts the master listener. Implement in specific implementations of Master.
        Throws:
        java.lang.Exception
        Since:
        2.4
      • stop

        public void stop()
        Stops the master from being working.
      • getMasterInfo

        public MasterInfo getMasterInfo()
        Returns:
        information about this master
        Since:
        2.4
      • sendToWorker

        public void sendToWorker(IWorker a_worker,
                                 WorkerCommand a_command)
                          throws java.io.IOException
        Sends a command to a worker.
        Parameters:
        a_worker - the worker to send the command to
        a_command - the command to send
        Throws:
        java.io.IOException
      • getDispatcher

        public RequestDispatcher getDispatcher()
        Returns:
        the RequestDispatcher used
        Since:
        2.4
      • getWorkerListener

        public WorkerListener getWorkerListener()
        Returns:
        the WorkerListener used
        Since:
        2.4

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.