java-design-patterns
java-design-patterns copied to clipboard
Scheduler pattern
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:
- Scheduler: Manages the execution of tasks, determining when and how often they should run.
- Task: Represents the work to be performed, encapsulating the logic for execution.
- Trigger/Condition: Specifies the criteria or schedule for task execution, such as time intervals or specific events.
- Execution Context: Provides the environment in which tasks are executed, handling necessary resources and states.
References
Acceptance Criteria
- Implement the Scheduler component to manage and execute tasks based on defined triggers or conditions.
- Define and implement a Task interface that encapsulates the logic for various tasks.
- Create examples demonstrating the usage of the Scheduler pattern with different types of triggers/conditions and tasks.
Can I take this one please.
Please, go ahead @mikulucky :+1:
@mikulucky are you still working on this?
This issue is free for taking again.
I'd like to take this one.
@mpodlodowski great, you're good to go!
@mpodlodowski are you still implementing this?
This issue is free again
Can I take it @iluwatar?
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.
Updated task description