com.esri.arcgis.datasourcesraster
Interface IThreadedProcessor

All Superinterfaces:
Serializable
All Known Implementing Classes:
ThreadedProcessor

public interface IThreadedProcessor
extends Serializable

Provides access to a multi-threaded processor that executes multiple jobs in parallel.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void cancel()
          Cancels current executing jobs.
 void execute(IEnumThreadedJobs pJobs, int numThreads, ITrackCancel pTrackCancel)
          Executes a given number of jobs in specified number of threads.
 IErrorInfo getErrorInfo()
          Get errors from failed execution.
 int getFailedThreadCount()
          Get number of threads failed.
 IThreadedJobResultHandler getResultHandler()
          The result handler which, if specified, receives job results from each thread as they become available.
 int getTotalWork()
          The total amount of work to be done by the processor.
 int getWaitInterval()
          The duration (in milliseconds) that the main thread waits before continuing to poll busy worker threads for status.
 int getWorkDone()
          The amount of work done by the processor.
 boolean isStopOnFirstError()
          Indicates whether execution should stop as soon as an error is encountered.
 void setResultHandlerByRef(IThreadedJobResultHandler ppThreadedJobResultHandler)
          The result handler which, if specified, receives job results from each thread as they become available.
 void setStopOnFirstError(boolean pbStopOnFirstError)
          Indicates whether execution should stop as soon as an error is encountered.
 void setTotalWork(int pTotalWork)
          The total amount of work to be done by the processor.
 void setWaitInterval(int pWaitInterval)
          The duration (in milliseconds) that the main thread waits before continuing to poll busy worker threads for status.
 void setWorkDone(int pWorkDone)
          The amount of work done by the processor.
 

Method Detail

execute

void execute(IEnumThreadedJobs pJobs,
             int numThreads,
             ITrackCancel pTrackCancel)
             throws IOException,
                    AutomationException
Executes a given number of jobs in specified number of threads.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pJobs - A reference to a com.esri.arcgis.datasourcesraster.IEnumThreadedJobs (in)
numThreads - The numThreads (in)
pTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setResultHandlerByRef

void setResultHandlerByRef(IThreadedJobResultHandler ppThreadedJobResultHandler)
                           throws IOException,
                                  AutomationException
The result handler which, if specified, receives job results from each thread as they become available.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
ppThreadedJobResultHandler - A reference to a com.esri.arcgis.datasourcesraster.IThreadedJobResultHandler (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResultHandler

IThreadedJobResultHandler getResultHandler()
                                           throws IOException,
                                                  AutomationException
The result handler which, if specified, receives job results from each thread as they become available.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.datasourcesraster.IThreadedJobResultHandler
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

cancel

void cancel()
            throws IOException,
                   AutomationException
Cancels current executing jobs.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTotalWork

void setTotalWork(int pTotalWork)
                  throws IOException,
                         AutomationException
The total amount of work to be done by the processor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pTotalWork - The pTotalWork (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTotalWork

int getTotalWork()
                 throws IOException,
                        AutomationException
The total amount of work to be done by the processor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pTotalWork
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkDone

int getWorkDone()
                throws IOException,
                       AutomationException
The amount of work done by the processor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pWorkDone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWorkDone

void setWorkDone(int pWorkDone)
                 throws IOException,
                        AutomationException
The amount of work done by the processor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pWorkDone - The pWorkDone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getErrorInfo

IErrorInfo getErrorInfo()
                        throws IOException,
                               AutomationException
Get errors from failed execution.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.system.IErrorInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFailedThreadCount

int getFailedThreadCount()
                         throws IOException,
                                AutomationException
Get number of threads failed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pThreadFailedCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStopOnFirstError

void setStopOnFirstError(boolean pbStopOnFirstError)
                         throws IOException,
                                AutomationException
Indicates whether execution should stop as soon as an error is encountered.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pbStopOnFirstError - The pbStopOnFirstError (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isStopOnFirstError

boolean isStopOnFirstError()
                           throws IOException,
                                  AutomationException
Indicates whether execution should stop as soon as an error is encountered.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pbStopOnFirstError
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWaitInterval

void setWaitInterval(int pWaitInterval)
                     throws IOException,
                            AutomationException
The duration (in milliseconds) that the main thread waits before continuing to poll busy worker threads for status.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pWaitInterval - The pWaitInterval (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWaitInterval

int getWaitInterval()
                    throws IOException,
                           AutomationException
The duration (in milliseconds) that the main thread waits before continuing to poll busy worker threads for status.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pWaitInterval
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.