@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableCacheControl extends Object implements CacheControl
CacheControl.
Use the builder to create immutable instances:
ImmutableCacheControl.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCacheControl.Builder
Builds instances of type
ImmutableCacheControl. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCacheControl.Builder |
builder()
Creates a builder for
ImmutableCacheControl. |
static ImmutableCacheControl |
copyOf(CacheControl instance)
Creates an immutable copy of a
CacheControl value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableCacheControl that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
timeToLive, timeToLiveUnit. |
long |
timeToLive()
Time to keep the metadata in cache.
|
TimeUnit |
timeToLiveUnit()
TimeUnit for the timeToLive.
|
String |
toString()
Prints the immutable value
CacheControl with attribute values. |
ImmutableCacheControl |
withTimeToLive(long value)
Copy the current immutable object by setting a value for the
timeToLive attribute. |
ImmutableCacheControl |
withTimeToLiveUnit(TimeUnit value)
Copy the current immutable object by setting a value for the
timeToLiveUnit attribute. |
public long timeToLive()
timeToLive in interface CacheControl@Nullable public TimeUnit timeToLiveUnit()
timeToLiveUnit in interface CacheControlpublic final ImmutableCacheControl withTimeToLive(long value)
timeToLive attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for timeToLivethis objectpublic final ImmutableCacheControl withTimeToLiveUnit(@Nullable TimeUnit value)
timeToLiveUnit attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for timeToLiveUnit (can be null)this objectpublic boolean equals(@Nullable Object another)
ImmutableCacheControl that have equal attribute values.public int hashCode()
timeToLive, timeToLiveUnit.public String toString()
CacheControl with attribute values.public static ImmutableCacheControl copyOf(CacheControl instance)
CacheControl 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 ImmutableCacheControl.Builder builder()
ImmutableCacheControl.
ImmutableCacheControl.builder()
.timeToLive(long) // required timeToLive
.timeToLiveUnit(concurrent.TimeUnit | null) // nullable timeToLiveUnit
.build();
Copyright © 2021–2022 Amazon Web Services. All rights reserved.