corda / net.corda.core.internal

Package net.corda.core.internal

Types

DeclaredField

class DeclaredField<T>

A simple wrapper around a Field object providing type safe read and write access using value, ignoring the field's visibility.

Emoji

object Emoji

A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal.

FlowStateMachine

interface FlowStateMachine<R>

This is an internal interface that is implemented by code in the node module. You should look at FlowLogic.

InputStreamAndHash

data class InputStreamAndHash

LazyPool

class LazyPool<A>

A lazy pool of resources A.

LazyStickyPool

class LazyStickyPool<A : Any>

A LazyStickyPool is a lazy pool of resources where a borrow may "stick" the borrowed instance to an object. Any subsequent borrows using the same object will return the same pooled instance.

LifeCycle

class LifeCycle<S : Enum<S>>

This class provides simple tracking of the lifecycle of a service-type object. S is an enum enumerating the possible states the service can be in.

ThreadBox

class ThreadBox<out T>

A threadbox is a simple utility that makes it harder to forget to take a lock before accessing some shared state. Simply define a private class to hold the data that must be grouped under the same lock, and then pass the only instance to the ThreadBox constructor. You can now use the locked method with a lambda to take the lock in a way that ensures it'll be released if there's an exception.

WriteOnceProperty

class WriteOnceProperty<T : Any>

A write-once property to be used as delegate for Kotlin var properties. The expectation is that this is initialised prior to the spawning of any threads that may access it and so there's no need for it to be volatile.

Extensions for External Classes

java.io.ByteArrayOutputStream

java.io.InputStream

java.lang.Class

java.nio.file.Path

java.time.Duration

java.time.temporal.Temporal

java.util.stream.Stream

kotlin.Any

kotlin.String

kotlin.Throwable

kotlin.collections.IntIterator

kotlin.collections.Iterable

kotlin.collections.List

kotlin.ranges.IntProgression

kotlin.reflect.KClass

org.slf4j.Logger

rx.Observable

rx.Observer

Functions

elapsedTime

fun elapsedTime(block: () -> Unit): Duration

Executes the given code block and returns a Duration of how long it took to execute in nanosecond precision.

logElapsedTime

fun <T> logElapsedTime(label: String, logger: Logger? = null, body: () -> T): T