Package org.elasticsearch.transport
Enum Class Transports
- All Implemented Interfaces:
Serializable
,Comparable<Transports>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
threads whose name is prefixed by this string will be considered network threads, even though they aren't -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
assertDefaultThreadContext(ThreadContext threadContext)
static boolean
assertNotTransportThread(String reason)
static boolean
static boolean
Utility method to detect whether a thread is a network thread.static Transports
Returns the enum constant of this class with the specified name.static Transports[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Field Details
-
TEST_MOCK_TRANSPORT_THREAD_PREFIX
threads whose name is prefixed by this string will be considered network threads, even though they aren't- See Also:
- Constant Field Values
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isTransportThread
Utility method to detect whether a thread is a network thread. Typically used in assertions to make sure that we do not call blocking code from networking threads. -
assertTransportThread
public static boolean assertTransportThread() -
assertNotTransportThread
-
assertDefaultThreadContext
-