Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsus committed Jul 27, 2020
1 parent 3735b40 commit c851a2b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
**Scheduler**
=
Created by Justin

Description
-
Scheduler is a library which adds the @Scheduled and @Delayed annotations. The @Scheduled annotation makes the method it
is attatched to run at a set interval while the @Delayed annotation delays calls to its method.

SchedulerController#delay() may be called instead of using the @Delayed annotation

Scheduler can and should be shaded into your jar.

SchedulerController#initialize() must be called.

#### @Scheduled

The Scheduled annotation takes in a double for each time unit, and a boolean for whether to schedule the target method
out of sync or not. The interval that the method is scheduled at is equal to the sum of all times entered. In order to
have the annotation take effect you must call SchedulerController#registerSynchronizationService() for the object
holding the annotated method.

You may call SchedulerController#dismissSynchronizationService() to stop all scheduled tasks for a source

#### @Delayed

The Scheduled annotation takes in a double for each time unit, and a boolean for whether to schedule the target method
out of sync or not. The delay takes place before the method is actually called is equal to the sum of all times entered.
In order to have the annotation take effect you must call SchedulerController#processAnnotationsFor(className) or
processAnnotationsIn(packageName) before the classes holding the annotations are loaded.

This annotation changes the bytecode of classes by basically wrapping methods annotated with @Delayed with
a call to SchedulerController#delay().

0 comments on commit c851a2b

Please sign in to comment.