com.r3corda.core

## Package com.r3corda.core

### Types

ThreadBox | `class ThreadBox<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 itll be released if theres an exception.
TransientProperty | `class TransientProperty<T>` A simple wrapper that enables the use of Kotlins "val x by TransientProperty { ... }" syntax. Such a property will not be serialized to disk, and if its missing (or the first time its accessed), the initializer will be used to set it up. Note that the initializer will be called with the TransientProperty object locked.

### Exceptions

RetryableException | `abstract class RetryableException : Exception` This represents a transient exception or condition that might no longer be thrown if the operation is re-run or called again.

### Extensions for External Classes

java.nio.file.Path |
java.time.temporal.Temporal |
kotlin.Double |
kotlin.Int |
kotlin.Long |
kotlin.String |
kotlin.collections.Iterable |
kotlin.collections.List |

### Properties

RunOnCallerThread | `val RunOnCallerThread: <ERROR CLASS>`

### Functions

extractZipFile | `fun extractZipFile(zipPath: Path, toPath: Path): Unit` Given a path to a zip file, extracts it to the given directory.
failure | `fun <T> <ERROR CLASS><T>.failure(executor: Executor, body: (Throwable) -> Unit): <ERROR CLASS>` `infix fun <T> <ERROR CLASS><T>.failure(body: (Throwable) -> Unit): <ERROR CLASS><T>`
logElapsedTime | `fun <T> logElapsedTime(label: String, logger: <ERROR CLASS>? = null, body: () -> T): T`
random63BitValue | `fun random63BitValue(): Long` Returns a random positive long generated using a secure RNG. This function sacrifies a bit of entropy in order to avoid potential bugs where the value is used in a context where negative numbers are not expected.
setFrom | `fun <T> <ERROR CLASS><T>.setFrom(logger: <ERROR CLASS>? = null, block: () -> T): <ERROR CLASS><T>` Executes the given block and sets the future to either the result, or any exception that was thrown.
success | `fun <T> <ERROR CLASS><T>.success(executor: Executor, body: (T) -> Unit): <ERROR CLASS>` `infix fun <T> <ERROR CLASS><T>.success(body: (T) -> Unit): <ERROR CLASS><T>`
then | `fun <T> <ERROR CLASS><T>.then(executor: Executor, body: () -> Unit): <ERROR CLASS>` `infix fun <T> <ERROR CLASS><T>.then(body: () -> Unit): <ERROR CLASS><T>`