|
RuneHive-Game
|
A class which dispatches requests to worker threads. More...
Static Public Member Functions | |
| static void | dispatch (Channel channel, OnDemandRequest request) |
| Dispatches an 'on-demand' request. | |
Static Package Functions | |
| static ChannelRequest< OnDemandRequest > | nextOnDemandRequest () throws InterruptedException |
| Gets the next 'on-demand' request from the queue, blocking if none are available. | |
Private Member Functions | |
| RequestDispatcher () | |
| Default private constructor to prevent instantiation. | |
Static Private Attributes | |
| static final int | MAXIMUM_QUEUE_SIZE = 1024 |
| The maximum size of a queue before requests are rejected. | |
| static final BlockingQueue< ChannelRequest< OnDemandRequest > > | onDemandQueue = new PriorityBlockingQueue<ChannelRequest<OnDemandRequest>>() |
| A queue for pending 'on-demand' requests. | |
A class which dispatches requests to worker threads.
Definition at line 14 of file RequestDispatcher.java.
|
private |
Default private constructor to prevent instantiation.
Definition at line 51 of file RequestDispatcher.java.
|
static |
Dispatches an 'on-demand' request.
| channel | The channel. |
| request | The request. |
Definition at line 41 of file RequestDispatcher.java.
References onDemandQueue.
Referenced by dev.advo.fs.net.FileServerHandler.messageReceived().
|
staticpackage |
Gets the next 'on-demand' request from the queue, blocking if none are available.
| InterruptedException | if the thread is interrupted. |
Definition at line 32 of file RequestDispatcher.java.
References onDemandQueue.
Referenced by dev.advo.fs.dispatch.OnDemandRequestWorker.nextRequest().
|
staticprivate |
The maximum size of a queue before requests are rejected.
Definition at line 19 of file RequestDispatcher.java.
|
staticprivate |
A queue for pending 'on-demand' requests.
Definition at line 24 of file RequestDispatcher.java.
Referenced by dispatch(), and nextOnDemandRequest().