public enum ThreadingBehavior extends Enum<ThreadingBehavior>
| 枚举常量和说明 |
|---|
IMMUTABLE
Instances of classes with the given contract are expected to be fully immutable
and thread-safe.
|
IMMUTABLE_CONDITIONAL
Instances of classes with the given contract are expected to be immutable if their
dependencies injected at construction time are immutable and are expected to be thread-safe
if their dependencies are thread-safe.
|
SAFE
Instances of classes with the given contract are expected to be fully thread-safe.
|
SAFE_CONDITIONAL
Instances of classes with the given contract are expected to be thread-safe if their
dependencies injected at construction time are thread-safe.
|
STATELESS
Instances of classes with the given contract are expected to maintain no state
and to be thread-safe.
|
UNSAFE
Instances of classes with the given contract are expected to be non thread-safe.
|
public static final ThreadingBehavior IMMUTABLE
public static final ThreadingBehavior IMMUTABLE_CONDITIONAL
public static final ThreadingBehavior STATELESS
public static final ThreadingBehavior SAFE
public static final ThreadingBehavior SAFE_CONDITIONAL
public static final ThreadingBehavior UNSAFE
public static ThreadingBehavior[] values()
for (ThreadingBehavior c : ThreadingBehavior.values()) System.out.println(c);
public static ThreadingBehavior valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2023. All rights reserved.