public final class ExecutorLithoHandler extends java.lang.Object implements RunnableHandler
LithoHandler
implementation that runs all layout computations against the provided
Executor
. This LithoHandler
can be used in apps that have a well established
threading model and need to run layout against one of their already available executors.RunnableHandler.DefaultHandler
Constructor and Description |
---|
ExecutorLithoHandler(java.util.concurrent.Executor executor)
Instantiates an
ExecutorLithoHandler that uses the given Executor to run all
layout tasks against. |
Modifier and Type | Method and Description |
---|---|
boolean |
isTracing() |
void |
post(java.lang.Runnable runnable,
java.lang.String tag) |
void |
postAtFront(java.lang.Runnable runnable,
java.lang.String tag) |
void |
remove(java.lang.Runnable runnable) |
public ExecutorLithoHandler(java.util.concurrent.Executor executor)
ExecutorLithoHandler
that uses the given Executor
to run all
layout tasks against.public void post(java.lang.Runnable runnable, java.lang.String tag)
post
in interface RunnableHandler
public void postAtFront(java.lang.Runnable runnable, java.lang.String tag)
In this implementation, postAtFront() is equivalent to post().
postAtFront
in interface RunnableHandler
public void remove(java.lang.Runnable runnable)
This implementation removes all instances of the provided Runnable
and prevents them
from running if they have not started yet.
remove
in interface RunnableHandler
public boolean isTracing()
isTracing
in interface RunnableHandler