30 lines
777 B
Markdown
Raw Normal View History

2017-04-22 17:16:38 +02:00
---
layout: pattern
title: Event Queue
folder: event-queue
permalink: /patterns/event-queue/
categories: Concurrency
tags:
- Java
- Difficulty Intermediate
- Queue
---
## Intent
Event Queue is a good pattern if You have a limited accesibility resource (for example:
Audio or Database), but You need to handle all the requests that want to use that.
It puts all the requests in a queue and process them asynchronously.
Gives the resource for the event when it is the next in the queue and in same time
removes it from the queue.
![alt text](./etc/model.png "Event Queue")
## Applicability
Use the Event Queue pattern when
* You have a limited accesibility resource and the asynchronous process is acceptable to reach that
## Credits
* [Mih<69>ly Kuprivecz - Event Queue]