net.corda.core

## Package net.corda.core

### Types

ErrorOr | `data class ErrorOr<out A>` Representation of an operation that may have thrown an error.
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 itll be released if theres an exception.
TransientProperty | `class TransientProperty<out 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.io.InputStream |
java.nio.file.Path |
java.time.temporal.Temporal |
kotlin.Double |
kotlin.Int |
kotlin.Long |
kotlin.String |
kotlin.Throwable |
kotlin.collections.Iterable |
kotlin.collections.List |

### Properties

RunOnCallerThread | `val RunOnCallerThread: <ERROR CLASS>`

### Functions

bufferUntilSubscribed | `fun <T> <ERROR CLASS><T>.bufferUntilSubscribed(): <ERROR CLASS><T>` Returns an observable that buffers events until subscribed.
catch | `fun <T> <ERROR CLASS><T>.catch(block: () -> T): Unit` Executes the given block and sets the future to either the result, or any exception that was thrown.
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>`
flatMap | `infix fun <F, T> <ERROR CLASS><F>.flatMap(mapper: (F) -> <ERROR CLASS><T>): <ERROR CLASS><T>`
future | `fun <T> future(block: () -> T): Future<T>`
logElapsedTime | `fun <T> logElapsedTime(label: String, logger: <ERROR CLASS>? = null, body: () -> T): T`
map | `infix fun <F, T> <ERROR CLASS><F>.map(mapper: (F) -> T): <ERROR CLASS><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.
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>`
toObservable | `fun <A> <ERROR CLASS><A>.toObservable(): <ERROR CLASS><A>`