Like Paul mentions it is indeed a strange requirement.
But then if you *really* need to implement something like that you can probably queue up the requests in a synchronised list, and have an independent
thread scan this list and pick up requests to service based upon some 'priority' parameter value.
On the flipside, like you mentioned there may be
thousands of requests - I really won't suggest using a data-structure to queue up the requests [you never know when your JVM runs out of memory]. Also, I'm pretty sure that the end user [client] experience won't be that great. Especially so, when the server makes him/her wait for a response for no apparent reason [assuming they aren't aware of the prioritisation of requests scenario]