Skip to content

Files

Latest commit

25ed7c0 · Oct 21, 2018

History

History
This branch is 2004 commits behind iluwatar/java-design-patterns:master.

event-queue

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 21, 2018
Oct 21, 2018
Aug 30, 2017
Sep 30, 2018
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