corda / net.corda.client.rpc / CordaRPCClientConfiguration

CordaRPCClientConfiguration

open class CordaRPCClientConfiguration

Can be used to configure the RPC client connection.

Constructors

<init>

Can be used to configure the RPC client connection.

CordaRPCClientConfiguration(connectionMaxRetryInterval: Duration = 3.minutes, minimumServerProtocolVersion: Int = PLATFORM_VERSION, trackRpcCallSites: Boolean = java.lang.Boolean.getBoolean("net.corda.client.rpc.trackRpcCallSites"), reapInterval: Duration = 1.seconds, observationExecutorPoolSize: Int = 4, connectionRetryInterval: Duration = 5.seconds, connectionRetryIntervalMultiplier: Double = 1.5, maxReconnectAttempts: Int = unlimitedReconnectAttempts, maxFileSize: Int = 10485760, deduplicationCacheExpiry: Duration = 1.days)

Properties

connectionMaxRetryInterval

The maximum retry interval for re-connections. The client will retry connections if the host is lost with ever increasing spacing until the max is reached. The default is 3 minutes.

open val connectionMaxRetryInterval: Duration

connectionRetryInterval

The base retry interval for reconnection attempts. The default is 5 seconds.

open val connectionRetryInterval: Duration

connectionRetryIntervalMultiplier

The retry interval multiplier for exponential backoff. The default is 1.5

open val connectionRetryIntervalMultiplier: Double

deduplicationCacheExpiry

The cache expiry of a deduplication watermark per client. Default is 1 day.

open val deduplicationCacheExpiry: Duration

maxFileSize

Maximum size of RPC responses, in bytes. Default is 10mb.

open val maxFileSize: Int

maxReconnectAttempts

Maximum reconnect attempts on failover or disconnection. Any negative value would mean that there will be an infinite number of reconnect attempts.

open val maxReconnectAttempts: Int

minimumServerProtocolVersion

The minimum protocol version required from the server. This is equivalent to the node's platform version number. If this minimum version is not met, an exception will be thrown at startup. If you use features introduced in a later version, you can bump this to match the platform version you need and get an early check that runs before you do anything.

open val minimumServerProtocolVersion: Int

observationExecutorPoolSize

The number of threads to use for observations for executing Observable.onNext. This only has any effect if observableExecutor is null (which is the default). The default is 4.

open val observationExecutorPoolSize: Int

reapInterval

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. The default is to check once per second.

open val reapInterval: Duration

trackRpcCallSites

If set to true the client will track RPC call sites (default is false). 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.

open val trackRpcCallSites: Boolean

Functions

component1

operator fun component1(): Duration

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Companion Object Properties

DEFAULT

Provides an instance of this class with the parameters set to our recommended defaults.

val DEFAULT: CordaRPCClientConfiguration