com.kuka.roboticsAPI.concurrencyModel
Class ParallelTask

java.lang.Object
  extended by com.kuka.roboticsAPI.concurrencyModel.ParallelTask
All Implemented Interfaces:
Runnable

public abstract class ParallelTask
extends Object
implements Runnable

A ParallelTAsk runs within a doParallel call. It performs a parallel action to other parallel tasks called in the same doParallel call.

This element is not in its final state and might change in future versions.

Constructor Summary
protected ParallelTask()
          Creates a new parallel task.
protected ParallelTask(boolean startImmediately)
          Creates a new parallel task.
protected ParallelTask(int priority)
          Creates a new parallel task.
protected ParallelTask(int priority, boolean startImmediately)
          Creates a new parallel task.
 
Method Summary
abstract  void run()
          Runs the parallel task.
 void waitForFinished()
          Blocks the calling thread until this parallel task is finished.
 void waitForFinished(long timeout, TimeUnit unit)
          Blocks the calling thread until this parallel task is finished or a timeout occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelTask

protected ParallelTask()
Creates a new parallel task. Priority is set to 5, startImmediately is set to false.


ParallelTask

protected ParallelTask(int priority)
Creates a new parallel task. StartImmediately is set to false.

Parameters:
priority - The priority of the task. Must be between 1 and 10.

ParallelTask

protected ParallelTask(boolean startImmediately)
Creates a new parallel task. Priority is set to 5.

Parameters:
startImmediately - Indicates if the parallel task starts as soon as possible or if it will start nearly at the same time like all other parallel tasks defined with this task.

ParallelTask

protected ParallelTask(int priority,
                       boolean startImmediately)
Creates a new parallel task.

Parameters:
priority - The priority of the task. Must be between 1 and 10.
startImmediately - Indicates if the parallel task starts as soon as possible or if it will start nearly at the same time like all other parallel tasks defined with this task.
Method Detail

run

public abstract void run()
Runs the parallel task. This method is called once. The user may do his or her parallel stuff in this method.

Specified by:
run in interface Runnable
This element is not in its final state and might change in future versions.

waitForFinished

public final void waitForFinished()
Blocks the calling thread until this parallel task is finished.

This element is not in its final state and might change in future versions.

waitForFinished

public final void waitForFinished(long timeout,
                                  TimeUnit unit)
Blocks the calling thread until this parallel task is finished or a timeout occured.

Parameters:
timeout - The timeout.
unit - The time unit.
This element is not in its final state and might change in future versions.


Copyright © 2019. All rights reserved.