java.lang.Object
java.lang.Record
com.zeroc.Ice.ConnectionOptions
- Record Components:
connectTimeout- the timeout for establishing a connectioncloseTimeout- the timeout for closing a connectionidleTimeout- the timeout for an idle connectionenableIdleCheck- whether to enable idle connection checksinactivityTimeout- the timeout for inactivity on a connectionmaxDispatches- the maximum number of dispatches allowed on a connection before it is closed
public record ConnectionOptions(int connectTimeout, int closeTimeout, int idleTimeout, boolean enableIdleCheck, int inactivityTimeout, int maxDispatches)
extends Record
Options for configuring the behavior of a connection. All timeouts are specified in seconds, and a timeout
value of 0 or less indicates an infinite timeout.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionOptions(int connectTimeout, int closeTimeout, int idleTimeout, boolean enableIdleCheck, int inactivityTimeout, int maxDispatches) Creates an instance of aConnectionOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecloseTimeoutrecord component.intReturns the value of theconnectTimeoutrecord component.booleanReturns the value of theenableIdleCheckrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theidleTimeoutrecord component.intReturns the value of theinactivityTimeoutrecord component.intReturns the value of themaxDispatchesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectionOptions
public ConnectionOptions(int connectTimeout, int closeTimeout, int idleTimeout, boolean enableIdleCheck, int inactivityTimeout, int maxDispatches) Creates an instance of aConnectionOptionsrecord class.- Parameters:
connectTimeout- the value for theconnectTimeoutrecord componentcloseTimeout- the value for thecloseTimeoutrecord componentidleTimeout- the value for theidleTimeoutrecord componentenableIdleCheck- the value for theenableIdleCheckrecord componentinactivityTimeout- the value for theinactivityTimeoutrecord componentmaxDispatches- the value for themaxDispatchesrecord component
-
-
Method Details
-
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 with '=='. -
connectTimeout
public int connectTimeout()Returns the value of theconnectTimeoutrecord component.- Returns:
- the value of the
connectTimeoutrecord component
-
closeTimeout
public int closeTimeout()Returns the value of thecloseTimeoutrecord component.- Returns:
- the value of the
closeTimeoutrecord component
-
idleTimeout
public int idleTimeout()Returns the value of theidleTimeoutrecord component.- Returns:
- the value of the
idleTimeoutrecord component
-
enableIdleCheck
public boolean enableIdleCheck()Returns the value of theenableIdleCheckrecord component.- Returns:
- the value of the
enableIdleCheckrecord component
-
inactivityTimeout
public int inactivityTimeout()Returns the value of theinactivityTimeoutrecord component.- Returns:
- the value of the
inactivityTimeoutrecord component
-
maxDispatches
public int maxDispatches()Returns the value of themaxDispatchesrecord component.- Returns:
- the value of the
maxDispatchesrecord component
-