csperandio.unifiedlog.storage.InMemorOffsetStorage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unified-log Show documentation
Show all versions of unified-log Show documentation
Base interfaces and implementation for Event-sourcing and unified-log
The newest version!
package csperandio.unifiedlog.storage
/**
* Stores the offset for a Walker in memory
*/
class InMemorOffsetStorage(start: Int = 0) : OffsetStorage {
private var current = start
override val value: Int
get() = current
override operator fun inc(): InMemorOffsetStorage {
++current
return this
}
}