Version

interface Version

Represents an entity that maintains version information for optimistic concurrency control and state tracking.

This interface provides a standardized way to handle versioning across different domain objects, ensuring that changes can be tracked and conflicts can be detected when multiple operations attempt to modify the same entity simultaneously.

The version starts at UNINITIALIZED_VERSION for new entities and increments with each modification. The first meaningful version after initialization is INITIAL_VERSION.

Author

ahoo wang

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether the entity has been initialized.

Link copied to clipboard

Whether the entity is at its initial version.

Link copied to clipboard
abstract val version: Int

The current version number of the entity.