Documentation of 'org.encog.util.concurrency.job.ConcurrentJob' Java class
ConcurrentJob
org.encog.util.concurrency.job

Class ConcurrentJob

  • All Implemented Interfaces:
    java.lang.Runnable, MultiThreadable
    Direct Known Subclasses:
    PruneIncremental


    public abstract class ConcurrentJob
    extends java.lang.Object
    implements java.lang.Runnable, MultiThreadable
    This class forms the basis for a job that can be run concurrently.
    • Constructor Detail

      • ConcurrentJob

        public ConcurrentJob(StatusReportable report)
        Construct a concurrent job.
        Parameters:
        report - The object to report status to.
    • Method Detail

      • loadWorkload

        public abstract int loadWorkload()
        Load the subtasks.
        Returns:
        The total number of subtasks.
      • performJobUnit

        public abstract void performJobUnit(JobUnitContext context)
        Perform one job unit.
        Parameters:
        context - The context for the job unit.
      • process

        public void process()
        Process the job.
      • processBackground

        public void processBackground()
      • reportStatus

        public void reportStatus(JobUnitContext context,
                                 java.lang.String status)
        Report the status for this job.
        Parameters:
        context - The job context.
        status - The status to report.
      • requestNextTask

        public abstract java.lang.Object requestNextTask()
        Request the next task to be processed.
        Returns:
        The next task to be processed.
      • getShouldStop

        public boolean getShouldStop()
        Returns:
        True if the process should stop.
      • stop

        public void stop()
        Request the process to stop.
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • isRunning

        public boolean isRunning()
        Returns:
        the running
      • getThreadCount

        public int getThreadCount()
        Specified by:
        getThreadCount in interface MultiThreadable
        Returns:
        The number of threads to use, 0 to automatically determine based on core count.
      • setThreadCount

        public void setThreadCount(int numThreads)
        Set the number of threads to use.
        Specified by:
        setThreadCount in interface MultiThreadable
        Parameters:
        numThreads - The number of threads to use, or zero to automatically determine based on core count.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.