Alexander Ivanov 4904d7eea0 #1021: Fix checkstyle warnings by changing the license header template (#1027)
* Add custom license header style in order to comply with Google's Checkstyle format

* Update license headers to comply with Google's Checkstyle format
2019-10-22 08:15:35 +03:00
..
2018-10-21 21:15:33 +03:00
2019-10-12 20:05:54 +03:00
2017-08-31 01:50:33 +05:30

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Event Queue event-queue /patterns/event-queue/ Concurrency
Java
Difficulty Intermediate
Queue

Intent

Event Queue is a good pattern if You have a limited accessibility 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

Applicability

Use the Event Queue pattern when

  • You have a limited accessibility resource and the asynchronous process is acceptable to reach that

Credits