Interface ConnectionDefinition

All Known Implementing Classes:
DefaultConnectionDefinition

public interface ConnectionDefinition
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
    • 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