corda / net.corda.core.internal

Package net.corda.core.internal

Types

AbstractAttachment

abstract class AbstractAttachment : Attachment

ContractUpgradeUtils

object ContractUpgradeUtils

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.

FetchAttachmentsFlow

class FetchAttachmentsFlow : FetchDataFlow<Attachment, ByteArray>

Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

FetchDataFlow

sealed class FetchDataFlow<T : NamedByHash, in W : Any> : FlowLogic<Result<T>>

An abstract flow for fetching typed data from a remote peer.

FetchTransactionsFlow

class FetchTransactionsFlow : FetchDataFlow<SignedTransaction, SignedTransaction>

Given a set of tx hashes (IDs), either loads them from local disk or asks the remote peer to provide them.

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.

LegalNameValidator

object LegalNameValidator

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.

ResolveTransactionsFlow

class ResolveTransactionsFlow : FlowLogic<List<SignedTransaction>>

Resolves transactions for the specified txHashes along with their full history (dependency graph) from otherSide. Each retrieved transaction is validated and inserted into the local transaction storage.

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.

UpgradeCommand

data class UpgradeCommand : CommandData

Indicates that this transaction replaces the inputs contract state to another contract state

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.

X509EdDSAEngine

class X509EdDSAEngine : Signature

Wrapper around EdDSAEngine which can intelligently rewrite X509Keys to a EdDSAPublicKey. This is a temporary solution until this is integrated upstream and/or a custom certificate factory implemented to force the correct key type. Only intercepts public keys passed into engineInitVerify, as there is no equivalent issue with private keys.

Annotations

VisibleForTesting

annotation class VisibleForTesting

The annotated object would have a more restricted visibility were it not needed in tests.

Extensions for External Classes

java.io.ByteArrayOutputStream

java.io.InputStream

java.lang.Class

java.nio.file.Path

java.security.cert.Certificate

java.time.Duration

java.time.temporal.Temporal

java.util.jar.JarInputStream

java.util.stream.Stream

kotlin.String

kotlin.Throwable

kotlin.collections.IntIterator

kotlin.collections.Iterable

kotlin.collections.List

kotlin.ranges.IntProgression

kotlin.reflect.KClass

org.bouncycastle.asn1.x500.X500Name

org.bouncycastle.cert.X509CertificateHolder

org.slf4j.Logger

rx.Observable

rx.Observer

Properties

countryCodes

val countryCodes: Set<String>

x500Name

val CordaX500Name.x500Name: X500Name

Return the underlying X.500 name from this Corda-safe X.500 name. These are guaranteed to have a consistent ordering, such that their toString() function returns the same value every time for the same CordaX500Name.

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

uncheckedCast

fun <T, U : T> uncheckedCast(obj: T): U