akka.dispatch
Class ExecutionContexts.sameThreadExecutionContext$

java.lang.Object
  extended by akka.dispatch.ExecutionContexts.sameThreadExecutionContext$
All Implemented Interfaces:
scala.concurrent.ExecutionContext
Enclosing class:
ExecutionContexts

public static class ExecutionContexts.sameThreadExecutionContext$
extends java.lang.Object
implements scala.concurrent.ExecutionContext

WARNING: Not A General Purpose ExecutionContext!

This is an execution context which runs everything on the calling thread. It is very useful for actions which are known to be non-blocking and non-throwing in order to save a round-trip to the thread pool.


Nested Class Summary
 
Nested classes/interfaces inherited from interface scala.concurrent.ExecutionContext
scala.concurrent.ExecutionContext.Implicits$
 
Constructor Summary
ExecutionContexts.sameThreadExecutionContext$()
           
 
Method Summary
 java.lang.ThreadLocal<scala.collection.immutable.List<java.lang.Runnable>> _tasksLocal()
           
 boolean batchable(java.lang.Runnable runnable)
          Override this to define which runnables will be batched.
 void execute(java.lang.Runnable runnable)
           
 void reportFailure(java.lang.Throwable t)
           
protected  void unbatchedExecute(java.lang.Runnable runnable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.concurrent.ExecutionContext
execute, prepare
 

Constructor Detail

ExecutionContexts.sameThreadExecutionContext$

public ExecutionContexts.sameThreadExecutionContext$()
Method Detail

unbatchedExecute

protected void unbatchedExecute(java.lang.Runnable runnable)

reportFailure

public void reportFailure(java.lang.Throwable t)
Specified by:
reportFailure in interface scala.concurrent.ExecutionContext

_tasksLocal

public java.lang.ThreadLocal<scala.collection.immutable.List<java.lang.Runnable>> _tasksLocal()

execute

public void execute(java.lang.Runnable runnable)
Specified by:
execute in interface java.util.concurrent.Executor

batchable

public boolean batchable(java.lang.Runnable runnable)
Override this to define which runnables will be batched.