iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
90.02k stars 26.6k forks source link

Scheduler pattern #76

Open iluwatar opened 9 years ago

iluwatar commented 9 years ago

Description

The Scheduler design pattern is a behavioral pattern used to manage the execution of tasks. This pattern is particularly useful in scenarios where tasks need to be executed at specific intervals or under specific conditions. The Scheduler pattern typically involves a scheduler component that manages task execution, a task component that defines the executable units of work, and a trigger or condition that initiates task execution.

Main elements of the Scheduler pattern:

  1. Scheduler: Manages the execution of tasks, determining when and how often they should run.
  2. Task: Represents the work to be performed, encapsulating the logic for execution.
  3. Trigger/Condition: Specifies the criteria or schedule for task execution, such as time intervals or specific events.
  4. Execution Context: Provides the environment in which tasks are executed, handling necessary resources and states.

References

Acceptance Criteria

  1. Implement the Scheduler component to manage and execute tasks based on defined triggers or conditions.
  2. Define and implement a Task interface that encapsulates the logic for various tasks.
  3. Create examples demonstrating the usage of the Scheduler pattern with different types of triggers/conditions and tasks.
mikulucky commented 8 years ago

Can I take this one please.

iluwatar commented 8 years ago

Please, go ahead @mikulucky :+1:

iluwatar commented 8 years ago

@mikulucky are you still working on this?

iluwatar commented 8 years ago

This issue is free for taking again.

mpodlodowski commented 7 years ago

I'd like to take this one.

iluwatar commented 7 years ago

@mpodlodowski great, you're good to go!

iluwatar commented 6 years ago

@mpodlodowski are you still implementing this?

iluwatar commented 5 years ago

This issue is free again

tiennm99 commented 1 year ago

Can I take it @iluwatar?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

iluwatar commented 5 months ago

Updated task description

ipaulaandreea commented 1 month ago

@iluwatar Can you assign me on this task, please?