public static final class Statistics.Builder extends Object
Statistics.
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 |
|---|---|
Statistics.Builder |
addAllUris(Iterable<String> elements)
Adds elements to
uris list. |
Statistics |
build()
Builds a new
Statistics. |
Statistics.Builder |
diskQuota(Long diskQuota)
Initializes the value for the
diskQuota attribute. |
Statistics.Builder |
fdsQuota(Integer fdsQuota)
Initializes the value for the
fdsQuota attribute. |
Statistics.Builder |
from(Statistics instance)
Fill a builder with attribute values from the provided
Statistics instance. |
Statistics.Builder |
host(String host)
Initializes the value for the
host attribute. |
Statistics.Builder |
memoryQuota(Long memoryQuota)
Initializes the value for the
memoryQuota attribute. |
Statistics.Builder |
name(String name)
Initializes the value for the
name attribute. |
Statistics.Builder |
netInfo(NetInfo netInfo)
Initializes the value for the
netInfo attribute. |
Statistics.Builder |
port(Integer port)
Initializes the value for the
port attribute. |
Statistics.Builder |
uptime(Long uptime)
Initializes the value for the
uptime attribute. |
Statistics.Builder |
uri(String element)
Adds one element to
uris list. |
Statistics.Builder |
uris(Iterable<String> elements)
Sets or replaces all elements for
uris list. |
Statistics.Builder |
uris(String... elements)
Adds elements to
uris list. |
Statistics.Builder |
usage(Usage usage)
Initializes the value for the
usage attribute. |
public final Statistics.Builder from(Statistics instance)
Statistics 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 invocationpublic final Statistics.Builder diskQuota(Long diskQuota)
diskQuota attribute.diskQuota - The value for diskQuota (can be null)this builder for use in a chained invocationpublic final Statistics.Builder fdsQuota(Integer fdsQuota)
fdsQuota attribute.fdsQuota - The value for fdsQuota (can be null)this builder for use in a chained invocationpublic final Statistics.Builder host(String host)
host attribute.host - The value for host (can be null)this builder for use in a chained invocationpublic final Statistics.Builder memoryQuota(Long memoryQuota)
memoryQuota attribute.memoryQuota - The value for memoryQuota (can be null)this builder for use in a chained invocationpublic final Statistics.Builder name(String name)
name attribute.name - The value for name (can be null)this builder for use in a chained invocationpublic final Statistics.Builder netInfo(NetInfo netInfo)
netInfo attribute.netInfo - The value for netInfo (can be null)this builder for use in a chained invocationpublic final Statistics.Builder port(Integer port)
port attribute.port - The value for port (can be null)this builder for use in a chained invocationpublic final Statistics.Builder uptime(Long uptime)
uptime attribute.uptime - The value for uptime (can be null)this builder for use in a chained invocationpublic final Statistics.Builder uri(String element)
uris list.element - A uris elementthis builder for use in a chained invocationpublic final Statistics.Builder uris(String... elements)
uris list.elements - An array of uris elementsthis builder for use in a chained invocationpublic final Statistics.Builder uris(Iterable<String> elements)
uris list.elements - An iterable of uris elementsthis builder for use in a chained invocationpublic final Statistics.Builder addAllUris(Iterable<String> elements)
uris list.elements - An iterable of uris elementsthis builder for use in a chained invocationpublic final Statistics.Builder usage(Usage usage)
usage attribute.usage - The value for usage (can be null)this builder for use in a chained invocationpublic Statistics build()
Statistics.IllegalStateException - if any required attributes are missingCopyright © 2020. All rights reserved.