public class CordaRPCClientConfiguration
Can be used to configure the RPC client connection.
@JvmField @NotNull public static CordaRPCClientConfiguration DEFAULT
Provides an instance of this class with the parameters set to our recommended defaults.
public static net.corda.client.rpc.CordaRPCClientConfiguration.Companion Companion
@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize, @NotNull java.time.Duration connectionRetryInterval, double connectionRetryIntervalMultiplier, int maxReconnectAttempts, int maxFileSize, @NotNull java.time.Duration deduplicationCacheExpiry)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.connectionRetryInterval
- The base retry interval for reconnection attempts. The default is 5 seconds.connectionRetryIntervalMultiplier
- The retry interval multiplier for exponential backoff. The default is 1.5maxReconnectAttempts
- Maximum reconnect attempts on failover or disconnection.Any negative value would mean that there will be an infinite number of reconnect attempts.maxFileSize
- Maximum size of RPC responses, in bytes. Default is 10mb.deduplicationCacheExpiry
- The cache expiry of a deduplication watermark per client. Default is 1 day.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize, @NotNull java.time.Duration connectionRetryInterval, double connectionRetryIntervalMultiplier, int maxReconnectAttempts, int maxFileSize)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.connectionRetryInterval
- The base retry interval for reconnection attempts. The default is 5 seconds.connectionRetryIntervalMultiplier
- The retry interval multiplier for exponential backoff. The default is 1.5maxReconnectAttempts
- Maximum reconnect attempts on failover or disconnection.Any negative value would mean that there will be an infinite number of reconnect attempts.maxFileSize
- Maximum size of RPC responses, in bytes. Default is 10mb.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize, @NotNull java.time.Duration connectionRetryInterval, double connectionRetryIntervalMultiplier, int maxReconnectAttempts)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.connectionRetryInterval
- The base retry interval for reconnection attempts. The default is 5 seconds.connectionRetryIntervalMultiplier
- The retry interval multiplier for exponential backoff. The default is 1.5maxReconnectAttempts
- Maximum reconnect attempts on failover or disconnection.Any negative value would mean that there will be an infinite number of reconnect attempts.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize, @NotNull java.time.Duration connectionRetryInterval, double connectionRetryIntervalMultiplier)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.connectionRetryInterval
- The base retry interval for reconnection attempts. The default is 5 seconds.connectionRetryIntervalMultiplier
- The retry interval multiplier for exponential backoff. The default is 1.5@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize, @NotNull java.time.Duration connectionRetryInterval)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.connectionRetryInterval
- The base retry interval for reconnection attempts. The default is 5 seconds.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval, int observationExecutorPoolSize)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.observationExecutorPoolSize
- The number of threads to use for observations for executing Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, @NotNull java.time.Duration reapInterval)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.reapInterval
- The interval of unused observable reaping. Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
trackRpcCallSites
- If set to true the client will track RPC call sites (default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
@JvmOverloads public CordaRPCClientConfiguration(@NotNull java.time.Duration connectionMaxRetryInterval)
Can be used to configure the RPC client connection.
connectionMaxRetryInterval
- The maximum retry interval for re-connections. The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.@JvmOverloads public CordaRPCClientConfiguration()
Can be used to configure the RPC client connection.
public boolean equals(@Nullable java.lang.Object other)
public int hashCode()
@NotNull public java.lang.String toString()
@Deprecated @NotNull public java.time.Duration component1()
@NotNull public java.time.Duration getConnectionMaxRetryInterval()
The maximum retry interval for re-connections.
The client will retry connections if the host is lost withever increasing spacing until the max is reached. The default is 3 minutes.
public int getMinimumServerProtocolVersion()
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.
If you leave it at the default then things will work but attempting to use an RPC added in a version later than the server supports will throw UnsupportedOperationException.
The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
public boolean getTrackRpcCallSites()
If set to true the client will track RPC call sites
(default is false). If an error occurs subsequentlyduring the RPC or in a returned Observable stream the stack trace of the originating RPC will be shown aswell. Note that constructing call stacks is a moderately expensive operation.
@NotNull public java.time.Duration getReapInterval()
The interval of unused observable reaping.
Leaked Observables (unused ones) are detected using weak referencesand are cleaned up in batches in this interval. If set too large it will waste server side resources for thisduration. If set too low it wastes client side cycles. The default is to check once per second.
public int getObservationExecutorPoolSize()
The number of threads to use for observations for executing
Observable.onNext. This only has any effectif observableExecutor is null (which is the default). The default is 4.
@NotNull public java.time.Duration getConnectionRetryInterval()
The base retry interval for reconnection attempts.
The default is 5 seconds.
public double getConnectionRetryIntervalMultiplier()
The retry interval multiplier for exponential backoff.
The default is 1.5
public int getMaxReconnectAttempts()
Maximum reconnect attempts on failover or disconnection.
Any negative value would mean that there will be an infinite number of reconnect attempts.
public int getMaxFileSize()
Maximum size of RPC responses,
in bytes. Default is 10mb.
@NotNull public java.time.Duration getDeduplicationCacheExpiry()
The cache expiry of a deduplication watermark per client.
Default is 1 day.