summaryrefslogtreecommitdiff
path: root/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt')
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt120
1 files changed, 96 insertions, 24 deletions
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt
index 3b02794d..133bd01c 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/TableWriter.kt
@@ -55,7 +55,10 @@ public interface TableWriter : AutoCloseable {
* @param value The boolean value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setBoolean(index: Int, value: Boolean)
+ public fun setBoolean(
+ index: Int,
+ value: Boolean,
+ )
/**
* Set the column with index [index] to integer [value].
@@ -64,7 +67,10 @@ public interface TableWriter : AutoCloseable {
* @param value The integer value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setInt(index: Int, value: Int)
+ public fun setInt(
+ index: Int,
+ value: Int,
+ )
/**
* Set the column with index [index] to long [value].
@@ -73,7 +79,10 @@ public interface TableWriter : AutoCloseable {
* @param value The long value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setLong(index: Int, value: Long)
+ public fun setLong(
+ index: Int,
+ value: Long,
+ )
/**
* Set the column with index [index] to float [value].
@@ -82,7 +91,10 @@ public interface TableWriter : AutoCloseable {
* @param value The float value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setFloat(index: Int, value: Float)
+ public fun setFloat(
+ index: Int,
+ value: Float,
+ )
/**
* Set the column with index [index] to double [value].
@@ -91,7 +103,10 @@ public interface TableWriter : AutoCloseable {
* @param value The double value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setDouble(index: Int, value: Double)
+ public fun setDouble(
+ index: Int,
+ value: Double,
+ )
/**
* Set the column with index [index] to [String] [value].
@@ -100,7 +115,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [String] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setString(index: Int, value: String)
+ public fun setString(
+ index: Int,
+ value: String,
+ )
/**
* Set the column with index [index] to [UUID] [value].
@@ -109,7 +127,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [UUID] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setUUID(index: Int, value: UUID)
+ public fun setUUID(
+ index: Int,
+ value: UUID,
+ )
/**
* Set the column with index [index] to [Instant] [value].
@@ -118,7 +139,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Instant] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setInstant(index: Int, value: Instant)
+ public fun setInstant(
+ index: Int,
+ value: Instant,
+ )
/**
* Set the column with index [index] to [Duration] [value].
@@ -127,7 +151,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Duration] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setDuration(index: Int, value: Duration)
+ public fun setDuration(
+ index: Int,
+ value: Duration,
+ )
/**
* Set the column with index [index] to [List] [value].
@@ -136,7 +163,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Map] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <T> setList(index: Int, value: List<T>)
+ public fun <T> setList(
+ index: Int,
+ value: List<T>,
+ )
/**
* Set the column with index [index] to [Set] [value].
@@ -145,7 +175,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Set] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <T> setSet(index: Int, value: Set<T>)
+ public fun <T> setSet(
+ index: Int,
+ value: Set<T>,
+ )
/**
* Set the column with index [index] to [Map] [value].
@@ -154,7 +187,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Map] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <K, V> setMap(index: Int, value: Map<K, V>)
+ public fun <K, V> setMap(
+ index: Int,
+ value: Map<K, V>,
+ )
/**
* Set the column named [name] to boolean [value].
@@ -163,7 +199,10 @@ public interface TableWriter : AutoCloseable {
* @param value The boolean value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setBoolean(name: String, value: Boolean): Unit = setBoolean(resolve(name), value)
+ public fun setBoolean(
+ name: String,
+ value: Boolean,
+ ): Unit = setBoolean(resolve(name), value)
/**
* Set the column named [name] to integer [value].
@@ -172,7 +211,10 @@ public interface TableWriter : AutoCloseable {
* @param value The integer value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setInt(name: String, value: Int): Unit = setInt(resolve(name), value)
+ public fun setInt(
+ name: String,
+ value: Int,
+ ): Unit = setInt(resolve(name), value)
/**
* Set the column named [name] to long [value].
@@ -181,7 +223,10 @@ public interface TableWriter : AutoCloseable {
* @param value The long value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setLong(name: String, value: Long): Unit = setLong(resolve(name), value)
+ public fun setLong(
+ name: String,
+ value: Long,
+ ): Unit = setLong(resolve(name), value)
/**
* Set the column named [name] to float [value].
@@ -190,7 +235,10 @@ public interface TableWriter : AutoCloseable {
* @param value The float value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setFloat(name: String, value: Float): Unit = setFloat(resolve(name), value)
+ public fun setFloat(
+ name: String,
+ value: Float,
+ ): Unit = setFloat(resolve(name), value)
/**
* Set the column named [name] to double [value].
@@ -199,7 +247,10 @@ public interface TableWriter : AutoCloseable {
* @param value The double value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setDouble(name: String, value: Double): Unit = setDouble(resolve(name), value)
+ public fun setDouble(
+ name: String,
+ value: Double,
+ ): Unit = setDouble(resolve(name), value)
/**
* Set the column named [name] to [String] [value].
@@ -208,7 +259,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [String] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setString(name: String, value: String): Unit = setString(resolve(name), value)
+ public fun setString(
+ name: String,
+ value: String,
+ ): Unit = setString(resolve(name), value)
/**
* Set the column named [name] to [UUID] [value].
@@ -217,7 +271,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [UUID] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setUUID(name: String, value: UUID): Unit = setUUID(resolve(name), value)
+ public fun setUUID(
+ name: String,
+ value: UUID,
+ ): Unit = setUUID(resolve(name), value)
/**
* Set the column named [name] to [Instant] [value].
@@ -226,7 +283,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Instant] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setInstant(name: String, value: Instant): Unit = setInstant(resolve(name), value)
+ public fun setInstant(
+ name: String,
+ value: Instant,
+ ): Unit = setInstant(resolve(name), value)
/**
* Set the column named [name] to [Duration] [value].
@@ -235,7 +295,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Duration] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun setDuration(name: String, value: Duration): Unit = setDuration(resolve(name), value)
+ public fun setDuration(
+ name: String,
+ value: Duration,
+ ): Unit = setDuration(resolve(name), value)
/**
* Set the column named [name] to [List] [value].
@@ -244,7 +307,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [List] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <T> setList(name: String, value: List<T>): Unit = setList(resolve(name), value)
+ public fun <T> setList(
+ name: String,
+ value: List<T>,
+ ): Unit = setList(resolve(name), value)
/**
* Set the column named [name] to [Set] [value].
@@ -253,7 +319,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Set] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <T> setSet(name: String, value: Set<T>): Unit = setSet(resolve(name), value)
+ public fun <T> setSet(
+ name: String,
+ value: Set<T>,
+ ): Unit = setSet(resolve(name), value)
/**
* Set the column named [name] to [Map] [value].
@@ -262,7 +331,10 @@ public interface TableWriter : AutoCloseable {
* @param value The [Map] value to set the column to.
* @throws IllegalArgumentException if the column is not valid for this method.
*/
- public fun <K, V> setMap(name: String, value: Map<K, V>): Unit = setMap(resolve(name), value)
+ public fun <K, V> setMap(
+ name: String,
+ value: Map<K, V>,
+ ): Unit = setMap(resolve(name), value)
/**
* Flush any buffered content to the underlying target.