C. How to customize a Job ?
1. Job ID
The ID of a job is generated at its creation by the function generateJobId(). By default it is the creation time in milliseconds and a upper-case letter (starting with 'A') which is incremented if the resulting ID is already used.
For instance: if the current date is 2011-01-18T16:50:12.163+0100 you will get: 1295365812163A ; if it is already used by another job, 1295365812163B, and so on.
However you can change the ID generation by overriding the function generateJobId(). For instance:
public class JobChvatal extends AbstractJob { ... @Override protected synchronized String generateJobId() { return "Chvatal_"+super.generateJobId(); } ... }
The resulting IDs will be the same than the formers, but prefixed with the name of the type of job (here: Chvatal).
IMPORTANT
You must ensure that all generated IDs are UNIQUE ! A Job whose the ID is already used is NOT added to the jobs list.