Interface ConnectionDefinition

All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource
All Known Implementing Classes:
DefaultConnectionDefinition

public interface ConnectionDefinition extends io.micronaut.core.annotation.AnnotationMetadataProvider
The connection definition.
Since:
4.0.0
Author:
Denis Stepanov
  • Field Details

  • Method Details

    • getPropagationBehavior

      @NonNull @NonNull ConnectionDefinition.Propagation getPropagationBehavior()
      Return the propagation behavior.
      Returns:
      The propagation behaviour
    • getTimeout

      Optional<Duration> getTimeout()
      Return the connection timeout.
      Returns:
      The optional timeout
    • isReadOnly

      Optional<Boolean> isReadOnly()
      Return whether this is a read-only connection.
      Returns:
      The optional read only
    • getName

      @Nullable @Nullable String getName()
      Return the name of this connection.
      Returns:
      The optional name
    • withPropagation

      @NonNull @NonNull ConnectionDefinition withPropagation(ConnectionDefinition.Propagation propagation)
      Connection definition with specific propagation.
      Parameters:
      propagation - The new propagation
      Returns:
      A new connection definition with specified propagation
    • withName

      @NonNull @NonNull ConnectionDefinition withName(String name)
      Connection definition with specific name.
      Parameters:
      name - The new name
      Returns:
      A new connection definition with specified name
    • withAnnotationMetadata

      @NonNull @NonNull ConnectionDefinition withAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
      Connection definition with new annotation metadata.
      Parameters:
      annotationMetadata - The new annotation metadata
      Returns:
      A new connection definition with specified annotation metadata
    • of

      @NonNull static @NonNull ConnectionDefinition of(@NonNull @NonNull ConnectionDefinition.Propagation propagationBehaviour)
      Create a new ConnectionDefinition for the given behaviour.
      Parameters:
      propagationBehaviour - The behaviour
      Returns:
      The definition
    • named

      @NonNull static @NonNull ConnectionDefinition named(@NonNull @NonNull String name)
      Create a new ConnectionDefinition with a given name.
      Parameters:
      name - The name
      Returns:
      The definition