@NotThreadSafe public static final class ImmutableTransactionTimerSnapshot.Builder extends Object
ImmutableTransactionTimerSnapshot.
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 |
|---|---|
ImmutableTransactionTimerSnapshot.Builder |
active(boolean active)
Initializes the value for the
active attribute. |
ImmutableTransactionTimerSnapshot |
build()
Builds a new
ImmutableTransactionTimerSnapshot. |
ImmutableTransactionTimerSnapshot.Builder |
copyFrom(TransactionTimer.TransactionTimerSnapshot instance)
Fill a builder with attribute values from the provided
TransactionTimerSnapshot instance. |
ImmutableTransactionTimerSnapshot.Builder |
count(long count)
Initializes the value for the
count attribute. |
ImmutableTransactionTimerSnapshot.Builder |
totalNanos(long totalNanos)
Initializes the value for the
totalNanos attribute. |
public final ImmutableTransactionTimerSnapshot.Builder active(boolean active)
active attribute.active - The value for activethis builder for use in a chained invocationpublic ImmutableTransactionTimerSnapshot build()
ImmutableTransactionTimerSnapshot.IllegalStateException - if any required attributes are missingpublic final ImmutableTransactionTimerSnapshot.Builder copyFrom(TransactionTimer.TransactionTimerSnapshot instance)
TransactionTimerSnapshot instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableTransactionTimerSnapshot.Builder count(long count)
count attribute.count - The value for countthis builder for use in a chained invocationpublic final ImmutableTransactionTimerSnapshot.Builder totalNanos(long totalNanos)
totalNanos attribute.totalNanos - The value for totalNanosthis builder for use in a chained invocationCopyright © 2011–2020 Glowroot contributors. All rights reserved.