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

xtdb.api.log.TxLog.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0-beta4
Show newest version
package xtdb.api.log

import xtdb.api.TransactionKey
import java.nio.ByteBuffer
import java.util.concurrent.CompletableFuture

interface TxLog {
    fun appendTx(record: ByteBuffer): CompletableFuture
    fun readTxs(afterTxId: Long?, limit: Int): List
    fun subscribeTxs(afterTxId: Long?, subscriber: Subscriber)

    class Record(val txKey: TransactionKey, val record: ByteBuffer)

    interface Subscriber {
        fun onSubscribe(closeHook: AutoCloseable)
        
        fun accept(t: Record)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy