@NotThreadSafe public static final class ImmutableSessionInfo.Builder extends Object
ImmutableSessionInfo.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableSessionInfo.Builder |
addAllChecks(Iterable<String> elements)
Adds elements to
checks list. |
ImmutableSessionInfo.Builder |
addChecks(String... elements)
Adds elements to
checks list. |
ImmutableSessionInfo.Builder |
addChecks(String element)
Adds one element to
checks list. |
ImmutableSessionInfo.Builder |
behavior(String behavior)
Initializes the value for the
behavior attribute. |
ImmutableSessionInfo |
build()
Builds a new
ImmutableSessionInfo. |
ImmutableSessionInfo.Builder |
checks(Iterable<String> elements)
Sets or replaces all elements for
checks list. |
ImmutableSessionInfo.Builder |
createIndex(long createIndex)
Initializes the value for the
createIndex attribute. |
ImmutableSessionInfo.Builder |
from(SessionInfo instance)
Fill a builder with attribute values from the provided
SessionInfo instance. |
ImmutableSessionInfo.Builder |
id(String id)
Initializes the value for the
id attribute. |
ImmutableSessionInfo.Builder |
lockDelay(Long lockDelay)
Initializes the value for the
lockDelay attribute. |
ImmutableSessionInfo.Builder |
name(Optional<String> name)
Initializes the optional value
name to name. |
ImmutableSessionInfo.Builder |
name(String name)
Initializes the optional value
name to name. |
ImmutableSessionInfo.Builder |
node(String node)
Initializes the value for the
node attribute. |
ImmutableSessionInfo.Builder |
ttl(Optional<String> ttl)
Initializes the optional value
ttl to ttl. |
ImmutableSessionInfo.Builder |
ttl(String ttl)
Initializes the optional value
ttl to ttl. |
@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder from(SessionInfo instance)
SessionInfo instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder createIndex(long createIndex)
createIndex attribute.createIndex - The value for createIndexthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder lockDelay(Long lockDelay)
lockDelay attribute.lockDelay - The value for lockDelaythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder name(String name)
name to name.name - The value for namethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder name(Optional<String> name)
name to name.name - The value for namethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder node(String node)
node attribute.node - The value for nodethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder addChecks(String element)
checks list.element - A checks elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder addChecks(String... elements)
checks list.elements - An array of checks elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder checks(Iterable<String> elements)
checks list.elements - An iterable of checks elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder addAllChecks(Iterable<String> elements)
checks list.elements - An iterable of checks elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder behavior(String behavior)
behavior attribute.behavior - The value for behaviorthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder ttl(String ttl)
ttl to ttl.ttl - The value for ttlthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder ttl(Optional<String> ttl)
ttl to ttl.ttl - The value for ttlthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSessionInfo.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic ImmutableSessionInfo build()
ImmutableSessionInfo.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.