@Documented @Inherited @Target(value={TYPE,FIELD,METHOD,CONSTRUCTOR}) @Retention(value=RUNTIME) public @interface Realtime
Indicates if an element has a bounded
worst-case execution time. The limit
behavior
of the execution time with the input size may be specified (if no limit
specified the worst case execution time is assumed to be constant).
public class Equalities { @Realtime(limit = UNKNOWN) public static final Equality<Object> STANDARD = new StandardComparatorImpl<Object>(); @Realtime(limit = CONSTANT) public static final Equality<Object> IDENTITY = new IdentityComparatorImpl<Object>(); @Realtime(limit = LINEAR) public static final Equality<Object> ARRAY = new ArrayComparatorImpl(); @Realtime(limit = LINEAR) public static final Equality<CharSequence> LEXICAL = new LexicalComparatorImpl(); }
Analysis tools / compilers may produce warnings if program elements use or override elements with incompatible real-time characteristics.
Note: For multi-cores systems, if a real-time element is Parallelizable
but not mutex-free
, response
time even for high priority threads may be unbounded due to
priority
inversion. This is no longer the case when running on real-time
VMs due to their support for priority inheritance.
Modifier and Type | Optional Element and Description |
---|---|
String |
comment
Provides additional information (default
"" ). |
Realtime.Limit |
limit
Returns the limit behavior for the worst-case execution time
(default
Realtime.Limit.CONSTANT ). |
boolean |
value
Indicates if this element has a bounded worst-case execution time
(default
true ). |
public abstract boolean value
true
).public abstract Realtime.Limit limit
Realtime.Limit.CONSTANT
).public abstract String comment
""
).Copyright © 2005-2013 Javolution. All Rights Reserved.