public class ThreadPoolLayoutHandler extends java.lang.Object implements RunnableHandler
RunnableHandler.DefaultHandler| Modifier and Type | Field and Description |
|---|---|
static LayoutThreadPoolConfiguration |
DEFAULT_LAYOUT_THREAD_POOL_CONFIGURATION |
| Modifier and Type | Method and Description |
|---|---|
static RunnableHandler |
getDefaultInstance()
Gets the default static singleton reference to
ThreadPoolLayoutHandler. |
static RunnableHandler |
getNewInstance(LayoutThreadPoolConfiguration configuration)
Creates a new
ThreadPoolLayoutHandler with the provided configuration. |
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 static final LayoutThreadPoolConfiguration DEFAULT_LAYOUT_THREAD_POOL_CONFIGURATION
public static RunnableHandler getDefaultInstance()
ThreadPoolLayoutHandler. It is preferred
to use the default thread pool in order prevent the app creating too many threads.ThreadPoolLayoutHandler.public static RunnableHandler getNewInstance(LayoutThreadPoolConfiguration configuration)
ThreadPoolLayoutHandler with the provided configuration. This method will
create a new ThreadPoolExecutor which can negatively affect the performance of the app.configuration - LayoutThreadPoolConfiguration specifying
core and max pool size, and thread priorityThreadPoolExecutor with specified configuration.public boolean isTracing()
isTracing in interface RunnableHandlerpublic void post(java.lang.Runnable runnable,
java.lang.String tag)
post in interface RunnableHandlerpublic void postAtFront(java.lang.Runnable runnable,
java.lang.String tag)
postAtFront in interface RunnableHandlerpublic void remove(java.lang.Runnable runnable)
remove in interface RunnableHandler