-
public interface MessageQueueThread
Encapsulates a Thread that can accept Runnables.
-
-
Method Summary
Modifier and Type Method Description abstract boolean
runOnQueue(Runnable runnable)
Runs the given Runnable on this Thread. abstract <T> Future<T>
callOnQueue(Callable<T> callable)
Runs the given Callable on this Thread. abstract boolean
isOnThread()
abstract void
assertIsOnThread()
Asserts isOnThread, throwing a AssertionException (NOT an ) if the assertion fails. abstract void
assertIsOnThread(String message)
Asserts isOnThread, throwing a AssertionException (NOT an ) if the assertion fails. abstract void
quitSynchronous()
Quits this MessageQueueThread. abstract MessageQueueThreadPerfStats
getPerfStats()
Returns the perf counters taken when the framework was started. abstract void
resetPerfStats()
Resets the perf counters. -
-
Method Detail
-
runOnQueue
abstract boolean runOnQueue(Runnable runnable)
Runs the given Runnable on this Thread. It will be submitted to the end of the event queue evenif it is being submitted from the same queue Thread.
-
callOnQueue
abstract <T> Future<T> callOnQueue(Callable<T> callable)
Runs the given Callable on this Thread. It will be submitted to the end of the event queue evenif it is being submitted from the same queue Thread.
-
isOnThread
abstract boolean isOnThread()
-
assertIsOnThread
abstract void assertIsOnThread()
Asserts isOnThread, throwing a AssertionException (NOT an ) if the assertion fails.
-
assertIsOnThread
abstract void assertIsOnThread(String message)
Asserts isOnThread, throwing a AssertionException (NOT an ) if the assertion fails. The given message is appended to the error.
-
quitSynchronous
abstract void quitSynchronous()
Quits this MessageQueueThread. If called from this MessageQueueThread, this will be the lastthing the thread runs. If called from a separate thread, this will block until the thread canbe quit and joined.
-
getPerfStats
abstract MessageQueueThreadPerfStats getPerfStats()
Returns the perf counters taken when the framework was started. This method is intended to beused for instrumentation purposes.
-
resetPerfStats
abstract void resetPerfStats()
Resets the perf counters. This is useful if the RN threads are being re-used. This method isintended to be used for instrumentation purposes.
-
-
-
-