Package io.micronaut.data.connection
Record Class DefaultConnectionDefinition
java.lang.Object
java.lang.Record
io.micronaut.data.connection.DefaultConnectionDefinition
- Record Components:
- name- The connection name
- propagationBehavior- The propagation behaviour
- timeout- The timeout
- readOnlyValue- The read only
- All Implemented Interfaces:
- ConnectionDefinition
@Internal
public record DefaultConnectionDefinition(@Nullable String name, ConnectionDefinition.Propagation propagationBehavior, @Nullable Duration timeout, Boolean readOnlyValue)
extends Record
implements ConnectionDefinition
Default implementation of the 
ConnectionDefinition interface.- Since:
- 4.0.0
- Author:
- Denis Stepanov
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.micronaut.data.connection.ConnectionDefinitionConnectionDefinition.Propagation
- 
Field SummaryFields inherited from interface io.micronaut.data.connection.ConnectionDefinitionDEFAULT, PROPAGATION_DEFAULT, READ_ONLY, REQUIRES_NEW
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultConnectionDefinition(@Nullable String name, ConnectionDefinition.Propagation propagationBehavior, @Nullable Duration timeout, Boolean readOnlyValue) Creates an instance of aDefaultConnectionDefinitionrecord class.DefaultConnectionDefinition(ConnectionDefinition.Propagation propagationBehaviour) DefaultConnectionDefinition(String name, boolean readOnly) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getName()Return the name of this connection.@NonNull ConnectionDefinition.PropagationReturn the propagation behavior.Return the connection timeout.final inthashCode()Returns a hash code value for this object.Return whether this is a read-only connection.@Nullable Stringname()Returns the value of thenamerecord component.Returns the value of thepropagationBehaviorrecord component.Returns the value of thereadOnlyValuerecord component.@Nullable Durationtimeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.Connection definition with specific name.withPropagation(ConnectionDefinition.Propagation propagation) Connection definition with specific propagation.
- 
Constructor Details- 
DefaultConnectionDefinition
- 
DefaultConnectionDefinition
- 
DefaultConnectionDefinitionpublic DefaultConnectionDefinition(@Nullable @Nullable String name, ConnectionDefinition.Propagation propagationBehavior, @Nullable @Nullable Duration timeout, Boolean readOnlyValue) Creates an instance of aDefaultConnectionDefinitionrecord class.- Parameters:
- name- the value for the- namerecord component
- propagationBehavior- the value for the- propagationBehaviorrecord component
- timeout- the value for the- timeoutrecord component
- readOnlyValue- the value for the- readOnlyValuerecord component
 
 
- 
- 
Method Details- 
isReadOnlyDescription copied from interface:ConnectionDefinitionReturn whether this is a read-only connection.- Specified by:
- isReadOnlyin interface- ConnectionDefinition
- Returns:
- The optional read only
 
- 
getPropagationBehaviorDescription copied from interface:ConnectionDefinitionReturn the propagation behavior.- Specified by:
- getPropagationBehaviorin interface- ConnectionDefinition
- Returns:
- The propagation behaviour
 
- 
getTimeoutDescription copied from interface:ConnectionDefinitionReturn the connection timeout.- Specified by:
- getTimeoutin interface- ConnectionDefinition
- Returns:
- The optional timeout
 
- 
getNameDescription copied from interface:ConnectionDefinitionReturn the name of this connection.- Specified by:
- getNamein interface- ConnectionDefinition
- Returns:
- The optional name
 
- 
withPropagationDescription copied from interface:ConnectionDefinitionConnection definition with specific propagation.- Specified by:
- withPropagationin interface- ConnectionDefinition
- Parameters:
- propagation- The new propagation
- Returns:
- A new connection definition with specified propagation
 
- 
withNameDescription copied from interface:ConnectionDefinitionConnection definition with specific name.- Specified by:
- withNamein interface- ConnectionDefinition
- Parameters:
- name- The new name
- Returns:
- A new connection definition with specified name
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
propagationBehaviorReturns the value of thepropagationBehaviorrecord component.- Returns:
- the value of the propagationBehaviorrecord component
 
- 
timeoutReturns the value of thetimeoutrecord component.- Returns:
- the value of the timeoutrecord component
 
- 
readOnlyValueReturns the value of thereadOnlyValuerecord component.- Returns:
- the value of the readOnlyValuerecord component
 
 
-