All Downloads are FREE. Search and download functionalities are using the official Maven repository.

akka.stream.alpakka.sqs.SqsAckSettings.scala Maven / Gradle / Ivy

Go to download

Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.

The newest version!
/*
 * Copyright (C) since 2016 Lightbend Inc. 
 */

package akka.stream.alpakka.sqs

final class SqsAckSettings private (val maxInFlight: Int) {

  require(maxInFlight > 0)

  def withMaxInFlight(value: Int): SqsAckSettings = copy(maxInFlight = value)

  private def copy(maxInFlight: Int): SqsAckSettings =
    new SqsAckSettings(maxInFlight = maxInFlight)

  override def toString =
    s"""SqsAckSinkSettings(maxInFlight=$maxInFlight)"""
}

object SqsAckSettings {

  val Defaults = new SqsAckSettings(maxInFlight = 10)

  /** Scala API */
  def apply(): SqsAckSettings = Defaults

  /** Java API */
  def create(): SqsAckSettings = Defaults

  /** Scala API */
  def apply(
      maxInFlight: Int
  ): SqsAckSettings = new SqsAckSettings(
    maxInFlight
  )

  /** Java API */
  def create(
      maxInFlight: Int
  ): SqsAckSettings = new SqsAckSettings(
    maxInFlight
  )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy