corda / net.corda.node.utilities

## Package net.corda.node.utilities

### Types

ANSIProgressObserver | `class ANSIProgressObserver` This observes the StateMachineManager and follows the progress of FlowLogics 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, out 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, out 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.
CompositeKeyColumnType | `object CompositeKeyColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of CompositeKey.
FiberBox | `class FiberBox<out T>` Modelled on ThreadBox, but with support for waiting that is compatible with Quasar Fibers and MutableClocks.
InstantColumnType | `object InstantColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of java.time.Instant.
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 : Table`
LocalDateColumnType | `object LocalDateColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of java.time.LocalDate.
LocalDateTimeColumnType | `object LocalDateTimeColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of java.time.LocalDateTime.
MutableClock | `abstract class MutableClock : Clock` An abstract class with helper methods for a type of Clock that might have it's concept of "now" adjusted externally.
PartyColumns | `data class PartyColumns`
PublicKeyColumnType | `object PublicKeyColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of PublicKey.
SecureHashColumnType | `object SecureHashColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of SecureHash.
ServiceIdentityGenerator | `object ServiceIdentityGenerator`
StateRefColumns | `data class StateRefColumns`
StrandLocalTransactionManager | `class StrandLocalTransactionManager : TransactionManager` A relatively close copy of the ThreadLocalTransactionManager in Exposed but with the following adjustments to suit our environment:
TestClock | `class TestClock : MutableClock, SerializeAsToken` A Clock that can have the date advanced for use in demos.
TxnNoteColumns | `data class TxnNoteColumns`
UUIDStringColumnType | `object UUIDStringColumnType : ColumnType` ColumnType for marshalling to/from database on behalf of UUID, always using a string representation.

### Extensions for External Classes

com.typesafe.config.Config |
java.time.Clock |
org.jetbrains.exposed.sql.Table |
rx.Observable |
rx.Observer |

### Properties

DEFAULT_MAX_BUCKETS | `val DEFAULT_MAX_BUCKETS: Int` The default maximum size of the LRU cache.
NODE_DATABASE_PREFIX | `const val NODE_DATABASE_PREFIX: String` Table prefix for all tables owned by the node module.

### Functions

bytesFromBlob | `fun <T : Any> bytesFromBlob(blob: Blob): SerializedBytes<T>`
bytesToBlob | `fun bytesToBlob(value: SerializedBytes<*>, finalizables: MutableList<() -> Unit>): Blob`
configureDatabase | `fun configureDatabase(props: Properties): Pair<Closeable, Database>`
createDatabaseTransaction | `fun createDatabaseTransaction(db: Database): Transaction`
databaseTransaction | `fun <T> databaseTransaction(db: Database, statement: Transaction.() -> T): T`
deserializeFromBlob | `fun <T : Any> deserializeFromBlob(blob: Blob): T`
isolatedTransaction | `fun <T> isolatedTransaction(database: Database, block: Transaction.() -> T): T`
main | `fun main(args: Array<String>): Unit`
serializeToBlob | `fun serializeToBlob(value: Any, finalizables: MutableList<() -> Unit>): Blob`