public abstract class Invoker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Invoker |
instance |
private static PerfLogger |
locksLog |
Constructor and Description |
---|
Invoker() |
Modifier and Type | Method and Description |
---|---|
void |
checkEventThread()
Throws
IllegalStateException if the current thread is not
the event thread. |
static Invoker |
getInvoker() |
abstract void |
invokeOnEventThread(java.lang.Runnable r) |
protected abstract boolean |
isEventThread() |
protected boolean |
lock(java.util.concurrent.locks.ReentrantLock lock) |
abstract void |
postOnEventThread(java.lang.Runnable r) |
static void |
setInvoker(Invoker invoker) |
protected boolean |
unlock(java.util.concurrent.locks.ReentrantLock lock) |
private static Invoker instance
private static final PerfLogger locksLog
public static void setInvoker(Invoker invoker)
public static Invoker getInvoker()
protected boolean lock(java.util.concurrent.locks.ReentrantLock lock)
protected boolean unlock(java.util.concurrent.locks.ReentrantLock lock)
protected abstract boolean isEventThread()
public void checkEventThread()
IllegalStateException
if the current thread is not
the event thread.java.lang.IllegalStateException
- if the current thread is not the event
threadpublic abstract void invokeOnEventThread(java.lang.Runnable r)
public abstract void postOnEventThread(java.lang.Runnable r)