-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20764b2
commit a6d8a90
Showing
9 changed files
with
164 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
kinesis/src/main/scala/akka/stream/alpakka/kinesis/KinesisSchedulerSettings.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (C) 2016-2019 Lightbend Inc. <http://www.lightbend.com> | ||
*/ | ||
|
||
package akka.stream.alpakka.kinesis | ||
|
||
import scala.concurrent.duration._ | ||
|
||
case class KinesisSchedulerSourceSettings(bufferSize: Int, | ||
terminateStreamGracePeriod: FiniteDuration, | ||
backpressureTimeout: FiniteDuration) { | ||
require( | ||
bufferSize >= 1, | ||
"Buffer size must be greater than 0; use size 1 to disable stage buffering" | ||
) | ||
} | ||
case class KinesisSchedulerCheckpointSettings(maxBatchSize: Int, maxBatchWait: FiniteDuration) { | ||
require( | ||
maxBatchSize >= 1, | ||
"Batch size must be greater than 0; use size 1 to commit records one at a time" | ||
) | ||
} | ||
|
||
object KinesisSchedulerSourceSettings { | ||
|
||
val defaultInstance = KinesisSchedulerSourceSettings(1000, 1.minute, 1.minute) | ||
|
||
/** | ||
* Java API | ||
*/ | ||
def create(bufferSize: Int, | ||
terminateStreamGracePeriod: FiniteDuration, | ||
backpressureTimeout: FiniteDuration): KinesisSchedulerSourceSettings = | ||
KinesisSchedulerSourceSettings(bufferSize, terminateStreamGracePeriod, backpressureTimeout) | ||
|
||
} | ||
|
||
object KinesisSchedulerCheckpointSettings { | ||
|
||
val defaultInstance = KinesisSchedulerCheckpointSettings(1000, 10.seconds) | ||
|
||
/** | ||
* Java API | ||
*/ | ||
def create(maxBatchSize: Int, maxBatchWait: FiniteDuration): KinesisSchedulerCheckpointSettings = | ||
KinesisSchedulerCheckpointSettings(maxBatchSize, maxBatchWait) | ||
|
||
} |
48 changes: 0 additions & 48 deletions
48
kinesis/src/main/scala/akka/stream/alpakka/kinesis/KinesisWorkerSettings.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.