Skip to content

Companion

object Companion

Properties

COUNTER_BOUND

const val COUNTER_BOUND: Int

The smallest integer that is not allowed in ObjectId.counter.

The minimum allowed value is 0.

MAX

val MAX: ObjectId

The maximum possible ObjectId: the one that is greater or equal to all possible ObjectId instances.

MIN

val MIN: ObjectId

The minimum possible ObjectId: the one that is lesser or equal to all possible ObjectId instances.

PROCESS_ID_BOUND

const val PROCESS_ID_BOUND: Long

The smallest integer that is not allowed in ObjectId.processId.

The minimum allowed value is 0.

Functions

maxAt

fun maxAt(timestamp: Instant): ObjectId

The maximum ObjectId created at timestamp.

It is guaranteed that:

  • All ObjectId instances created at timestamp are lesser or equal to the output of this function.

  • All ObjectId instances created before timestamp are strictly lesser than the output of this function.

  • All ObjectId instances created after timestamp are strictly greater than the output of this function.

This function is particularly helpful to create queries against ranges of timestamps.

See also

minAt

fun minAt(timestamp: Instant): ObjectId

The minimum ObjectId created at timestamp.

It is guaranteed that:

  • All ObjectId instances created at timestamp are greater or equal to the output of this function.

  • All ObjectId instances created before timestamp are strictly lesser than the output of this function.

  • All ObjectId instances created after timestamp are strictly greater than the output of this function.

This function is particularly helpful to create queries against ranges of timestamps.

See also