@Immutable public class SuspensionPenalty extends Object
MIN_KEY_RETRY_DELAY
milliseconds between two subsequent key
verifications.Modifier and Type | Field and Description |
---|---|
static int |
MIN_KEY_RETRY_DELAY
The minimum delay between subsequent attempts to verify a key
in milliseconds.
|
Modifier and Type | Method and Description |
---|---|
static long |
enforce(long last)
Call this method in a key verification loop in order to enforce a
suspension penalty for providing a wrong key of at least
MIN_KEY_RETRY_DELAY milliseconds. |
public static final int MIN_KEY_RETRY_DELAY
public static long enforce(long last)
MIN_KEY_RETRY_DELAY
milliseconds.
Interrupting the current thread does not show any effect on this method.last
- the last try time.
This should be zero upon the first call.
Subsequent calls should provide the return value of the last
call.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.