public final class ImmutableTimeoutConfig extends Object implements TimeoutConfig
TimeoutConfig.
Use the builder to create immutable instances:
ImmutableTimeoutConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTimeoutConfig.Builder
Builds instances of type
ImmutableTimeoutConfig. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableTimeoutConfig.Builder |
builder()
Creates a builder for
ImmutableTimeoutConfig. |
static ImmutableTimeoutConfig |
copyOf(TimeoutConfig instance)
Creates an immutable copy of a
TimeoutConfig value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTimeoutConfig that have equal attribute values. |
int |
getConnectionTimeout() |
int |
getReadTimeout() |
int |
hashCode()
Computes a hash code from attributes:
connectionTimeout, readTimeout. |
String |
toString()
Prints the immutable value
TimeoutConfig with attribute values. |
ImmutableTimeoutConfig |
withConnectionTimeout(int value)
Copy the current immutable object by setting a value for the
connectionTimeout attribute. |
ImmutableTimeoutConfig |
withReadTimeout(int value)
Copy the current immutable object by setting a value for the
readTimeout attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdefaultspublic int getConnectionTimeout()
getConnectionTimeout in interface TimeoutConfigconnectionTimeout attributepublic int getReadTimeout()
getReadTimeout in interface TimeoutConfigreadTimeout attributepublic final ImmutableTimeoutConfig withConnectionTimeout(int value)
connectionTimeout attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for connectionTimeoutthis objectpublic final ImmutableTimeoutConfig withReadTimeout(int value)
readTimeout attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for readTimeoutthis objectpublic boolean equals(Object another)
ImmutableTimeoutConfig that have equal attribute values.public int hashCode()
connectionTimeout, readTimeout.public String toString()
TimeoutConfig with attribute values.public static ImmutableTimeoutConfig copyOf(TimeoutConfig instance)
TimeoutConfig value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableTimeoutConfig.Builder builder()
ImmutableTimeoutConfig.
ImmutableTimeoutConfig.builder()
.connectionTimeout(int) // optional connectionTimeout
.readTimeout(int) // optional readTimeout
.build();
builder in interface TimeoutConfigCopyright © 2024. All rights reserved.