Record Class SessionCache
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.connection.SessionCache
- Record Components:
tickets- the session ticketstokens- the address validation tokens
What a client remembers about servers between connections: TLS session tickets, for resumption
and 0-RTT (each ticket also carries the server's transport parameters, which 0-RTT data must keep
within), and NEW_TOKEN tokens, which let a server skip its Retry round trip. Both are kept by
server name (or by address when there is none) and handed out once.
Share one cache among the connections to the same servers; it is thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SessionCachememory()A bounded in-memory cache for 256 servers: up to 8 tickets and 2 tokens each.static SessionCachenone()A cache that remembers nothing: every connection makes a full handshake.tickets()Returns the value of theticketsrecord component.tokens()Returns the value of thetokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SessionCache
A cache.- Parameters:
tickets- the session ticketstokens- the address validation tokens
-
-
Method Details
-
memory
A bounded in-memory cache for 256 servers: up to 8 tickets and 2 tokens each.- Returns:
- a new cache
-
none
A cache that remembers nothing: every connection makes a full handshake.- Returns:
- the cache
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tickets
Returns the value of theticketsrecord component.- Returns:
- the value of the
ticketsrecord component
-
tokens
Returns the value of thetokensrecord component.- Returns:
- the value of the
tokensrecord component
-