com.github.manosbatsis.corda.rpc.poolboy / PoolBoy
PoolBoy¶
class PoolBoy
Provides RPC connection pooling
Constructors¶
| Name | Summary |
|---|---|
| <init> | PoolBoy(rpcConfigurationService:RpcConfigurationService)Provides RPC connection pooling |
Functions¶
| Name | Summary |
|---|---|
| borrowConnection | fun borrowConnection(key:PoolKey):NodeRpcConnectionOnly use if you know what you are doing. Explicitly borrow a NodeRpcConnection from the pool. |
| forKey | fun forKey(key:PoolKey):PoolBoyConnectionGet a pool-able connection wrapper for the given key |
| returnConnection | fun returnConnection(key:PoolKey, rpcConnection:NodeRpcConnection): UnitOnly use if you know what you are doing. Explicitly return a NodeRpcConnection from the pool. |
| withConnection | fun <A> withConnection(key:PoolKey, block: (NodeRpcConnection) ->A):ARun some code with a NodeRpcConnection from the pool in-context |