Skip to content

Commit

Permalink
Implement default function for ConsolidationMode
Browse files Browse the repository at this point in the history
  • Loading branch information
oteffahi committed Aug 7, 2024
1 parent d2c0446 commit 83e30f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ enum class ConsolidationMode {

/** Holds back samples to only send the set of samples that had the highest timestamp for their key. */
LATEST;

companion object {
fun default() = AUTO
}
}
2 changes: 1 addition & 1 deletion zenoh-kotlin/src/commonMain/kotlin/io/zenoh/query/Get.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Get<R> private constructor() {

private var timeout = Duration.ofMillis(10000)
private var target: QueryTarget = QueryTarget.BEST_MATCHING
private var consolidation: ConsolidationMode = ConsolidationMode.AUTO
private var consolidation: ConsolidationMode = ConsolidationMode.default()
private var value: Value? = null
private var attachment: ByteArray? = null
private var onClose: (() -> Unit)? = null
Expand Down

0 comments on commit 83e30f5

Please sign in to comment.