|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.scheduler.Hash
public abstract class Hash
Generates a pseudo-random sequence of integers in the specified range.
CronTab
supports tokens like '@daily', which means "do it once a day".
Exactly which time of the day this gets scheduled is randomized --- randomized
in the sense that it's spread out when many jobs choose @daily, but it's at
the same time stable so that every job sticks to a specific time of the day
even after the configuration is updated.
Method Summary | |
---|---|
static Hash |
from(String seed)
|
abstract int |
next(int n)
Produces an integer in [0,n) |
static Hash |
zero()
Creates a hash that always return 0. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract int next(int n)
public static Hash from(String seed)
public static Hash zero()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |