public class CordaRPCClientConfiguration
Can be used to configure the RPC client connection.
Modifier and Type | Class and Description |
---|---|
static class |
CordaRPCClientConfiguration.Companion |
Modifier and Type | Field and Description |
---|---|
static CordaRPCClientConfiguration.Companion |
Companion |
Constructor and Description |
---|
CordaRPCClientConfiguration(java.time.Duration connectionMaxRetryInterval,
int minimumServerProtocolVersion,
boolean trackRpcCallSites,
java.time.Duration reapInterval,
int observationExecutorPoolSize,
java.time.Duration connectionRetryInterval,
double connectionRetryIntervalMultiplier,
int maxReconnectAttempts,
int maxFileSize,
java.time.Duration deduplicationCacheExpiry)
Can be used to configure the RPC client connection.
|
CordaRPCClientConfiguration()
Can be used to configure the RPC client connection.
|
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
component1()
Deprecated.
|
boolean |
equals(java.lang.Object other) |
java.time.Duration |
getConnectionMaxRetryInterval()
The maximum retry interval for re-connections.
|
java.time.Duration |
getConnectionRetryInterval()
The base retry interval for reconnection attempts.
|
double |
getConnectionRetryIntervalMultiplier()
The retry interval multiplier for exponential backoff.
|
java.time.Duration |
getDeduplicationCacheExpiry()
The cache expiry of a deduplication watermark per client.
|
int |
getMaxFileSize()
Maximum size of RPC responses,
|
int |
getMaxReconnectAttempts()
Maximum reconnect attempts on failover or disconnection.
|
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.
|
int |
getObservationExecutorPoolSize()
The number of threads to use for observations for executing
|
java.time.Duration |
getReapInterval()
The interval of unused observable reaping.
|
boolean |
getTrackRpcCallSites()
If set to true the client will track RPC call sites
|
int |
hashCode() |
java.lang.String |
toString() |
public static CordaRPCClientConfiguration.Companion Companion
public CordaRPCClientConfiguration(java.time.Duration connectionMaxRetryInterval, int minimumServerProtocolVersion, boolean trackRpcCallSites, java.time.Duration reapInterval, int observationExecutorPoolSize, java.time.Duration connectionRetryInterval, double connectionRetryIntervalMultiplier, int maxReconnectAttempts, int maxFileSize, 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.public CordaRPCClientConfiguration()
Can be used to configure the RPC client connection.
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public java.time.Duration component1()
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.
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.
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.
public java.time.Duration getDeduplicationCacheExpiry()
The cache expiry of a deduplication watermark per client.
Default is 1 day.