@Header(value="Age") public class Age extends BasicIntegerHeader
The age the object has been in a proxy cache in seconds.
Age: 12
Age = "Age" ":" age-value age-value = delta-seconds
Age values are non-negative decimal integers, representing time in seconds.
If a cache receives a value larger than the largest positive integer it can represent, or if any of its age calculations overflows, it MUST transmit an Age header with a value of 2147483648 (2^31).
An HTTP/1.1 server that includes a cache MUST include an Age header field in every response generated from its own cache.
Caches SHOULD use an arithmetic type of at least 31 bits of range.
Constructor and Description |
---|
Age(Object value)
Constructor.
|
Age(String value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static Age |
of(Object value)
Convenience creator.
|
static Age |
of(Supplier<?> value)
Convenience creator using supplier.
|
asInt, assertInteger, getValue, of, of
assertName, assertValue, canCast, cast, eqIC, equals, getElements, getName, getRawValue, hashCode, isSupplier, of, ofPair, toString, unwrap
public Age(Object value)
value
- The header value.
Number
- Converted to an integer using Number.intValue()
.
String
- Parsed using Integer.parseInt(String)
.
Supplier
of anything on this list.
public static Age of(Object value)
value
- The header value.
Number
- Converted to an integer using Number.intValue()
.
String
- Parsed using Integer.parseInt(String)
.
BasicIntegerHeader
object.public static Age of(Supplier<?> value)
Header value is re-evaluated on each call to BasicIntegerHeader.getValue()
.
value
- The header value supplier.
Number
- Converted to an integer using Number.intValue()
.
String
- Parsed using Integer.parseInt(String)
.
BasicIntegerHeader
object.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.