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 aConnectionOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecloseTimeout
record component.int
Returns the value of theconnectTimeout
record component.boolean
Returns the value of theenableIdleCheck
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of theidleTimeout
record component.int
Returns the value of theinactivityTimeout
record component.int
Returns the value of themaxDispatches
record component.final String
toString()
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 aConnectionOptions
record class.- Parameters:
connectTimeout
- the value for theconnectTimeout
record componentcloseTimeout
- the value for thecloseTimeout
record componentidleTimeout
- the value for theidleTimeout
record componentenableIdleCheck
- the value for theenableIdleCheck
record componentinactivityTimeout
- the value for theinactivityTimeout
record componentmaxDispatches
- the value for themaxDispatches
record 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 theconnectTimeout
record component.- Returns:
- the value of the
connectTimeout
record component
-
closeTimeout
public int closeTimeout()Returns the value of thecloseTimeout
record component.- Returns:
- the value of the
closeTimeout
record component
-
idleTimeout
public int idleTimeout()Returns the value of theidleTimeout
record component.- Returns:
- the value of the
idleTimeout
record component
-
enableIdleCheck
public boolean enableIdleCheck()Returns the value of theenableIdleCheck
record component.- Returns:
- the value of the
enableIdleCheck
record component
-
inactivityTimeout
public int inactivityTimeout()Returns the value of theinactivityTimeout
record component.- Returns:
- the value of the
inactivityTimeout
record component
-
maxDispatches
public int maxDispatches()Returns the value of themaxDispatches
record component.- Returns:
- the value of the
maxDispatches
record component
-