public class ThreadPoolLayoutHandler extends Object implements LayoutHandler
Modifier and Type | Class and Description |
---|---|
static interface |
ThreadPoolLayoutHandler.PoolSizeCalculator
A PoolSizeCalculator instance can be passed to construct the ThreadPoolLayoutHandler for a
custom way of calculating the number of threads based on the number of cores available on the
device.
|
Constructor and Description |
---|
ThreadPoolLayoutHandler(int corePoolSize,
int maxPoolSize) |
ThreadPoolLayoutHandler(ThreadPoolLayoutHandler.PoolSizeCalculator poolSizeCalculator) |
Modifier and Type | Method and Description |
---|---|
boolean |
post(Runnable runnable) |
void |
removeCallbacks(Runnable runnable) |
void |
removeCallbacksAndMessages(Object token) |
public ThreadPoolLayoutHandler(int corePoolSize, int maxPoolSize)
public ThreadPoolLayoutHandler(ThreadPoolLayoutHandler.PoolSizeCalculator poolSizeCalculator)
public boolean post(Runnable runnable)
post
in interface LayoutHandler
public void removeCallbacks(Runnable runnable)
removeCallbacks
in interface LayoutHandler
public void removeCallbacksAndMessages(Object token)
removeCallbacksAndMessages
in interface LayoutHandler