corda / net.corda.client.rpc / CordaRPCClientConfiguration

CordaRPCClientConfiguration

open class CordaRPCClientConfiguration

Can be used to configure the RPC client connection.

Constructors

<init>

CordaRPCClientConfiguration(connectionMaxRetryInterval: Duration = 3.minutes, minimumServerProtocolVersion: Int = 0, trackRpcCallSites: Boolean = false, reapInterval: Duration = 1.seconds, observationExecutorPoolSize: Int = 4, cacheConcurrencyLevel: Int = 1, connectionRetryInterval: Duration = 5.seconds, connectionRetryIntervalMultiplier: Double = 1.5, maxReconnectAttempts: Int = unlimitedReconnectAttempts, maxFileSize: Int = 10485760, deduplicationCacheExpiry: Duration = 1.days)

Can be used to configure the RPC client connection.

Properties

cacheConcurrencyLevel

open val cacheConcurrencyLevel: Int

Determines the concurrency level of the Observable Cache. This is exposed because it implicitly determines the limit on the number of leaked observables reaped because of garbage collection per reaping. See the implementation of com.google.common.cache.LocalCache for details.

connectionMaxRetryInterval

open val connectionMaxRetryInterval: Duration

Maximum retry interval.

connectionRetryInterval

open val connectionRetryInterval: Duration

The retry interval of Artemis connections in milliseconds.

connectionRetryIntervalMultiplier

open val connectionRetryIntervalMultiplier: Double

The retry interval multiplier for exponential backoff.

deduplicationCacheExpiry

open val deduplicationCacheExpiry: Duration

The cache expiry of a deduplication watermark per client.

maxFileSize

open val maxFileSize: Int

Maximum file size, in bytes.

maxReconnectAttempts

open val maxReconnectAttempts: Int

Maximum reconnect attempts on failover>

minimumServerProtocolVersion

open val minimumServerProtocolVersion: Int

The minimum protocol version required from the server.

observationExecutorPoolSize

open val observationExecutorPoolSize: Int

The number of threads to use for observations (for executing Observable.onNext).

reapInterval

open val reapInterval: Duration

The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak references and are cleaned up in batches in this interval. If set too large it will waste server side resources for this duration. If set too low it wastes client side cycles.

trackRpcCallSites

open val trackRpcCallSites: Boolean

If set to true the client will track RPC call sites. If an error occurs subsequently during the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown as well. Note that constructing call stacks is a moderately expensive operation.

Functions

component1

operator fun component1(): Duration

copy

fun copy(connectionMaxRetryInterval: Duration = this.connectionMaxRetryInterval, minimumServerProtocolVersion: Int = this.minimumServerProtocolVersion, trackRpcCallSites: Boolean = this.trackRpcCallSites, reapInterval: Duration = this.reapInterval, observationExecutorPoolSize: Int = this.observationExecutorPoolSize, cacheConcurrencyLevel: Int = this.cacheConcurrencyLevel, connectionRetryInterval: Duration = this.connectionRetryInterval, connectionRetryIntervalMultiplier: Double = this.connectionRetryIntervalMultiplier, maxReconnectAttempts: Int = this.maxReconnectAttempts, maxFileSize: Int = this.maxFileSize, deduplicationCacheExpiry: Duration = this.deduplicationCacheExpiry): CordaRPCClientConfiguration

Create a new copy of a configuration object with zero or more parameters modified.

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Companion Object Properties

DEFAULT

val DEFAULT: CordaRPCClientConfiguration

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.