Package com.biglybt.core.util
Class AsyncDispatcher
- java.lang.Object
-
- com.biglybt.core.util.AsyncDispatcher
-
public class AsyncDispatcher extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private int
num_priority
private int
priority
private AERunnable
queue_head
(package private) AESemaphore
queue_sem
private java.util.LinkedList<AERunnable>
queue_tail
(package private) int
quiesce_after_millis
private AEThread2
thread
-
Constructor Summary
Constructors Constructor Description AsyncDispatcher()
AsyncDispatcher(int quiesce_after_millis)
AsyncDispatcher(java.lang.String name)
AsyncDispatcher(java.lang.String _name, int _quiesce_after_millis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(AERunnable target)
void
dispatch(AERunnable target, boolean is_priority)
void
dispatch(java.lang.Runnable r)
int
getQueueSize()
boolean
isDispatchThread()
boolean
isQuiescent()
void
setPriority(int p)
-
-
-
Field Detail
-
name
private final java.lang.String name
-
thread
private AEThread2 thread
-
priority
private int priority
-
queue_head
private AERunnable queue_head
-
queue_tail
private java.util.LinkedList<AERunnable> queue_tail
-
queue_sem
final AESemaphore queue_sem
-
num_priority
private int num_priority
-
quiesce_after_millis
final int quiesce_after_millis
-
-
Method Detail
-
dispatch
public void dispatch(java.lang.Runnable r)
-
dispatch
public void dispatch(AERunnable target)
-
dispatch
public void dispatch(AERunnable target, boolean is_priority)
-
isQuiescent
public boolean isQuiescent()
-
getQueueSize
public int getQueueSize()
-
setPriority
public void setPriority(int p)
-
isDispatchThread
public boolean isDispatchThread()
-
-