Skip to content

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):NodeRpcConnection
Only use if you know what you are doing. Explicitly borrow a NodeRpcConnection from the pool.
forKey fun forKey(key:PoolKey):PoolBoyConnection
Get a pool-able connection wrapper for the given key
returnConnection fun returnConnection(key:PoolKey, rpcConnection:NodeRpcConnection): Unit
Only use if you know what you are doing. Explicitly return a NodeRpcConnection from the pool.
withConnection fun <A> withConnection(key:PoolKey, block: (NodeRpcConnection) ->A):A
Run some code with a NodeRpcConnection from the pool in-context