com.r3corda.node.utilities

Package com.r3corda.node.utilities

Types

ANSIProgressObserver class ANSIProgressObserver

This observes the StateMachineManager and follows the progress of ProtocolLogics until they complete in the order they are added to the StateMachineManager.

ANSIProgressRenderer object ANSIProgressRenderer

Knows how to render a ProgressTracker to the terminal using coloured, emoji-fied output. Useful when writing small command line tools, demos, tests etc. Just set the progressTracker field and it will go ahead and start drawing if the terminal supports it. Otherwise it just prints out the name of the step whenever it changes.

AbstractJDBCHashMap abstract class AbstractJDBCHashMap<K : Any, V : Any, T : JDBCHashedTable> : MutableMap<K, V>, AbstractMap<K, V>

A base class for a JDBC table backed hash map that iterates in insertion order by using an ever increasing sequence number on entries. Iterators supports remove() but entries are not really mutable and do not support setValue() method from MutableMap.MutableEntry.

AbstractJDBCHashSet abstract class AbstractJDBCHashSet<K : Any, T : JDBCHashedTable> : MutableSet<K>, AbstractSet<K>

Base class for JDBC backed hash set that delegates to a JDBC backed hash map where the values are all Unit and not actually persisted. Iteration order is order of insertion. Iterators can remove().

AddOrRemove enum class AddOrRemove

Enum for when adding/removing something, for example adding or removing an entry in a directory.

AffinityExecutor interface AffinityExecutor : Executor

An extended executor interface that supports thread affinity assertions and short circuiting. This can be useful for ensuring code runs on the right thread, and also for unit testing.

FiberBox class FiberBox<out T>

Modelled on ThreadBox, but with support for waiting that is compatible with Quasar Fibers and MutableClocks.

JDBCHashMap class JDBCHashMap<K : Any, V : Any> : AbstractJDBCHashMap<K, V, BlobMapTable>

A convenient JDBC table backed hash map with iteration order based on insertion order. See AbstractJDBCHashMap for further implementation details.

JDBCHashSet class JDBCHashSet<K : Any> : AbstractJDBCHashSet<K, BlobSetTable>

A convenient JDBC table backed hash set with iteration order based on insertion order. See AbstractJDBCHashSet and AbstractJDBCHashMap for further implementation details.

JDBCHashedTable open class JDBCHashedTable
JsonSupport object JsonSupport

Utilities and serialisers for working with JSON representations of basic types. This adds Jackson support for the java.time API, some core types, and Kotlin data classes.

MutableClock abstract class MutableClock : Clock

An abstract class with helper methods for a type of Clock that might have its concept of "now" adjusted externally.

Extensions for External Classes

java.time.Clock

Functions

configureDatabase fun configureDatabase(props: Properties): <ERROR CLASS><Closeable, <ERROR CLASS>>
databaseTransaction fun <T> databaseTransaction(statement: <ERROR CLASS>.() -> T): T
deserializeFromBlob fun <T : Any> deserializeFromBlob(blob: Blob): T
serializeToBlob fun <T : Any> serializeToBlob(value: T, finalizables: MutableList<() -> Unit>): Blob