Public Member Functions | Package Functions | Private Attributes | Static Private Attributes
org.ros.concurrent.DefaultScheduledExecutorService Class Reference
Inheritance diagram for org.ros.concurrent.DefaultScheduledExecutorService:
Inheritance graph
[legend]

List of all members.

Public Member Functions

boolean awaitTermination (long timeout, TimeUnit unit) throws InterruptedException
 DefaultScheduledExecutorService ()
 DefaultScheduledExecutorService (ExecutorService executorService)
 DefaultScheduledExecutorService (ExecutorService executorService, ScheduledExecutorService scheduledExecutorService)
void execute (Runnable command)
boolean isShutdown ()
boolean isTerminated ()
ScheduledFuture<?> schedule (Runnable command, long delay, TimeUnit unit)
ScheduledFuture<?> scheduleAtFixedRate (Runnable command, long initialDelay, long period, TimeUnit unit)
ScheduledFuture<?> scheduleWithFixedDelay (Runnable command, long initialDelay, long delay, TimeUnit unit)
void shutdown ()
List< Runnable > shutdownNow ()
Future<?> submit (Runnable task)

Package Functions

public< T > List< Future< T > > invokeAll (Collection<?extends Callable< T >> tasks) throws InterruptedException
public< T > List< Future< T > > invokeAll (Collection<?extends Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException
public< T > T invokeAny (Collection<?extends Callable< T >> tasks) throws InterruptedException, ExecutionException
public< T > T invokeAny (Collection<?extends Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
public< V > ScheduledFuture< V > schedule (Callable< V > callable, long delay, TimeUnit unit)
public< T > Future< T > submit (Callable< T > task)
public< T > Future< T > submit (Runnable task, T result)

Private Attributes

final ExecutorService executorService
final ScheduledExecutorService scheduledExecutorService

Static Private Attributes

static final int CORE_POOL_SIZE = 11

Detailed Description

This wraps a Executors#newCachedThreadPool() and a Executors#newScheduledThreadPool(int) to provide the functionality of both in a single ScheduledExecutorService. This is necessary since the ScheduledExecutorService uses an unbounded queue which makes it impossible to create an unlimited number of threads on demand (as explained in the ThreadPoolExecutor class javadoc.

Author:
damonkohler@google.com (Damon Kohler)

Definition at line 45 of file DefaultScheduledExecutorService.java.


Constructor & Destructor Documentation

Definition at line 52 of file DefaultScheduledExecutorService.java.

This instance will take over the lifecycle of the services.

Parameters:
executorService

Definition at line 61 of file DefaultScheduledExecutorService.java.

org.ros.concurrent.DefaultScheduledExecutorService.DefaultScheduledExecutorService ( ExecutorService  executorService,
ScheduledExecutorService  scheduledExecutorService 
) [inline]

This instance will take over the lifecycle of the services.

Parameters:
executorService
scheduledExecutorService

Definition at line 71 of file DefaultScheduledExecutorService.java.


Member Function Documentation

boolean org.ros.concurrent.DefaultScheduledExecutorService.awaitTermination ( long  timeout,
TimeUnit  unit 
) throws InterruptedException [inline]

First calls awaitTermination(long, TimeUnit) on the wrapped ExecutorService and then awaitTermination(long, TimeUnit) on the wrapped ScheduledExecutorService.

Returns:
 true 
if both Executors terminated,
 false 
otherwise

Definition at line 110 of file DefaultScheduledExecutorService.java.

Definition at line 157 of file DefaultScheduledExecutorService.java.

public<T> List<Future<T> > org.ros.concurrent.DefaultScheduledExecutorService.invokeAll ( Collection<?extends Callable< T >>  tasks) throws InterruptedException [inline, package]

Definition at line 133 of file DefaultScheduledExecutorService.java.

public<T> List<Future<T> > org.ros.concurrent.DefaultScheduledExecutorService.invokeAll ( Collection<?extends Callable< T >>  tasks,
long  timeout,
TimeUnit  unit 
) throws InterruptedException [inline, package]

Definition at line 139 of file DefaultScheduledExecutorService.java.

public<T> T org.ros.concurrent.DefaultScheduledExecutorService.invokeAny ( Collection<?extends Callable< T >>  tasks) throws InterruptedException, ExecutionException [inline, package]

Definition at line 145 of file DefaultScheduledExecutorService.java.

public<T> T org.ros.concurrent.DefaultScheduledExecutorService.invokeAny ( Collection<?extends Callable< T >>  tasks,
long  timeout,
TimeUnit  unit 
) throws InterruptedException, ExecutionException, TimeoutException [inline, package]

Definition at line 151 of file DefaultScheduledExecutorService.java.

Definition at line 92 of file DefaultScheduledExecutorService.java.

Definition at line 97 of file DefaultScheduledExecutorService.java.

ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.schedule ( Runnable  command,
long  delay,
TimeUnit  unit 
) [inline]

Definition at line 162 of file DefaultScheduledExecutorService.java.

public<V> ScheduledFuture<V> org.ros.concurrent.DefaultScheduledExecutorService.schedule ( Callable< V >  callable,
long  delay,
TimeUnit  unit 
) [inline, package]

Definition at line 167 of file DefaultScheduledExecutorService.java.

ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.scheduleAtFixedRate ( Runnable  command,
long  initialDelay,
long  period,
TimeUnit  unit 
) [inline]

Definition at line 172 of file DefaultScheduledExecutorService.java.

ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.scheduleWithFixedDelay ( Runnable  command,
long  initialDelay,
long  delay,
TimeUnit  unit 
) [inline]

Definition at line 178 of file DefaultScheduledExecutorService.java.

Definition at line 78 of file DefaultScheduledExecutorService.java.

Definition at line 84 of file DefaultScheduledExecutorService.java.

public<T> Future<T> org.ros.concurrent.DefaultScheduledExecutorService.submit ( Callable< T >  task) [inline, package]

Definition at line 118 of file DefaultScheduledExecutorService.java.

public<T> Future<T> org.ros.concurrent.DefaultScheduledExecutorService.submit ( Runnable  task,
result 
) [inline, package]

Definition at line 123 of file DefaultScheduledExecutorService.java.

Future<?> org.ros.concurrent.DefaultScheduledExecutorService.submit ( Runnable  task) [inline]

Definition at line 128 of file DefaultScheduledExecutorService.java.


Member Data Documentation

Definition at line 47 of file DefaultScheduledExecutorService.java.

Definition at line 49 of file DefaultScheduledExecutorService.java.

Definition at line 50 of file DefaultScheduledExecutorService.java.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:50