corda / net.corda.core.utilities / Id

Id

open class Id<out VALUE : Any>

Represents a unique, timestamped id.

Parameters

value - unique value of the id.

entityType - optional id entity type.

timestamp - timestamp for the id.

Constructors

<init>

Id(value: VALUE, entityType: String?, timestamp: Instant)

Represents a unique, timestamped id.

Properties

entityType

val entityType: String?

optional id entity type.

timestamp

val timestamp: Instant

timestamp for the id.

value

val value: VALUE

unique value of the id.

Functions

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Companion Object Functions

newInstance

fun <V : Any> newInstance(value: V, entityType: String? = null, timestamp: Instant = now()): Id<V>

Creates an id using Instant.now as timestamp.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.

Inheritors

InvocationId

class InvocationId : Id<String>

Represents id and timestamp of an invocation.

SessionId

class SessionId : Id<String>

Represents id and timestamp of a session.