public enum ThreadSafetyLevel extends java.lang.Enum<ThreadSafetyLevel>
Enum Constant and Description |
---|
COMPLETELY_THREADSAFE
The associated code is completely threadsafe and may be accessed
concurrently by any number of threads, subject to the constraints described
in the
ThreadSafety documentation. |
INTERFACE_NOT_THREADSAFE
Methods declared in the associated interface or abstract class are not
required to be threadsafe and classes which call them must not rely on the
ability to concurrently invoke those methods on the same object instance
without any external synchronization.
|
INTERFACE_THREADSAFE
Methods declared in the associated interface or abstract class must be
threadsafe in classes which implement that interface or extend that
abstract class.
|
METHOD_NOT_THREADSAFE
The associated method may not be considered threadsafe and should not be
invoked concurrently by multiple threads.
|
METHOD_THREADSAFE
The associated method may be considered threadsafe and may be invoked
concurrently by multiple threads, subject to the constraints described in
the
ThreadSafety documentation, and in any additional notes
contained in the method-level javadoc. |
MOSTLY_NOT_THREADSAFE
The associated code is mostly not threadsafe, but there may be some methods
which are safe to be invoked concurrently by multiple threads.
|
MOSTLY_THREADSAFE
The associated code is mostly threadsafe, but there may be some methods
which are not safe to be invoked when multiple threads are accessing an
instance concurrently.
|
NOT_THREADSAFE
The associated code is not threadsafe.
|
Modifier and Type | Method and Description |
---|---|
static ThreadSafetyLevel |
forName(java.lang.String name)
Retrieves the thread safety level with the specified name.
|
static ThreadSafetyLevel |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadSafetyLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadSafetyLevel COMPLETELY_THREADSAFE
ThreadSafety
documentation.public static final ThreadSafetyLevel MOSTLY_THREADSAFE
ThreadSafety
annotations using the METHOD_NOT_THREADSAFE
level.public static final ThreadSafetyLevel MOSTLY_NOT_THREADSAFE
ThreadSafety
annotations using the METHOD_THREADSAFE
level.public static final ThreadSafetyLevel NOT_THREADSAFE
public static final ThreadSafetyLevel INTERFACE_THREADSAFE
public static final ThreadSafetyLevel INTERFACE_NOT_THREADSAFE
public static final ThreadSafetyLevel METHOD_THREADSAFE
ThreadSafety
documentation, and in any additional notes
contained in the method-level javadoc.public static final ThreadSafetyLevel METHOD_NOT_THREADSAFE
public static ThreadSafetyLevel[] values()
for (ThreadSafetyLevel c : ThreadSafetyLevel.values()) System.out.println(c);
public static ThreadSafetyLevel valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Nullable public static ThreadSafetyLevel forName(@NotNull java.lang.String name)
name
- The name of the thread safety level to retrieve. It must not
be null
.null
if no such
level is defined.