Record Class ConnectionPool.PooledConnection
java.lang.Object
java.lang.Record
com.loomcache.client.ConnectionPool.PooledConnection
- Enclosing class:
ConnectionPool
public static record ConnectionPool.PooledConnection(Socket socket, DataInputStream in, DataOutputStream out, Instant createdAt, AtomicLong lastUsedNanos, com.loomcache.client.ConnectionPool.ConnectionState state, WireCompression wireCompression)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPooledConnection(Socket socket, DataInputStream in, DataOutputStream out, Instant createdAt, AtomicLong lastUsedNanos, com.loomcache.client.ConnectionPool.ConnectionState state) PooledConnection(Socket socket, DataInputStream in, DataOutputStream out, Instant createdAt, AtomicLong lastUsedNanos, com.loomcache.client.ConnectionPool.ConnectionState state, WireCompression wireCompression) Creates an instance of aPooledConnectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.in()Returns the value of theinrecord component.Returns the value of thelastUsedNanosrecord component.out()Returns the value of theoutrecord component.socket()Returns the value of thesocketrecord component.com.loomcache.client.ConnectionPool.ConnectionStatestate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewireCompressionrecord component.
-
Constructor Details
-
PooledConnection
public PooledConnection(Socket socket, DataInputStream in, DataOutputStream out, Instant createdAt, AtomicLong lastUsedNanos, com.loomcache.client.ConnectionPool.ConnectionState state) -
PooledConnection
public PooledConnection(Socket socket, DataInputStream in, DataOutputStream out, Instant createdAt, AtomicLong lastUsedNanos, com.loomcache.client.ConnectionPool.ConnectionState state, WireCompression wireCompression) Creates an instance of aPooledConnectionrecord class.- Parameters:
socket- the value for thesocketrecord componentin- the value for theinrecord componentout- the value for theoutrecord componentcreatedAt- the value for thecreatedAtrecord componentlastUsedNanos- the value for thelastUsedNanosrecord componentstate- the value for thestaterecord componentwireCompression- the value for thewireCompressionrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
socket
Returns the value of thesocketrecord component.- Returns:
- the value of the
socketrecord component
-
in
Returns the value of theinrecord component.- Returns:
- the value of the
inrecord component
-
out
Returns the value of theoutrecord component.- Returns:
- the value of the
outrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
lastUsedNanos
Returns the value of thelastUsedNanosrecord component.- Returns:
- the value of the
lastUsedNanosrecord component
-
state
public com.loomcache.client.ConnectionPool.ConnectionState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
wireCompression
Returns the value of thewireCompressionrecord component.- Returns:
- the value of the
wireCompressionrecord component
-