Package opennlp.tools.commons
Annotation Type ThreadSafe
-
@Documented @Retention(RUNTIME) public @interface ThreadSafe
Classes, fields, or methods annotated@ThreadSafe
are safe to use in multithreading contexts. In general, classes that adhere to (one of) the following concepts:- Statelessness: no methods relies on external state or maintain state at all,
- Immutability: all attributes are
final
so that internal state can't be modified at all, - Thread locality: non-
final
fields are only accessed via an independently initialized copy, - Atomicity: all operations on fields are perform via
atomic data types
, or - Synchronization: all non-final methods, fields, or
method local variables are manipulated via locks, that is, in a
synchronized
manner
-
-
Element Detail
-
since
String since
The OpenNLP release when an element was first declaredthread-safe
.- Default:
- ""
-
-