DriverDSLImpl

class DriverDSLImpl(val portAllocation: PortAllocation, val debugPortAllocation: PortAllocation, val systemProperties: Map<String, String>, val driverDirectory: Path, val useTestClock: Boolean, val isDebug: Boolean, val startNodesInProcess: Boolean, val waitForAllNodesToFinish: Boolean, val extraCordappPackagesToScan: List<String>, val jmxPolicy: JmxPolicy, val notarySpecs: List<NotarySpec>, val compatibilityZone: CompatibilityZoneParams?, val networkParameters: <Error class: unknown class>, val notaryCustomOverrides: Map<String, Any?>, val inMemoryDB: Boolean, val cordappsForAllNodes: Collection<TestCordappInternal>?, val environmentVariables: Map<String, String>, val enableSNI: Boolean = false, val allowHibernateToManageAppSchema: Boolean = true, val premigrateH2Database: Boolean = true, val notaryHandleTimeout: Duration = Duration.ofMinutes(2)) : InternalDriverDSL

Constructors

Link copied to clipboard
constructor(portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, driverDirectory: Path, useTestClock: Boolean, isDebug: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, notarySpecs: List<NotarySpec>, compatibilityZone: CompatibilityZoneParams?, networkParameters: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordappInternal>?, environmentVariables: Map<String, String>, enableSNI: Boolean = false, allowHibernateToManageAppSchema: Boolean = true, premigrateH2Database: Boolean = true, notaryHandleTimeout: Duration = Duration.ofMinutes(2))

Types

Link copied to clipboard
object Companion
Link copied to clipboard
inner class LocalNetworkMap(notaryInfos: List<<Error class: unknown class>>)

The local version of the network map, which is a bunch of classes that copy the relevant files to the node directories.

Link copied to clipboard
class State
Link copied to clipboard
interface Waitable

Properties

Link copied to clipboard
Link copied to clipboard

Returns the NotaryHandle for the single notary on the network. Throws if there are none or more than one.

Link copied to clipboard
open val defaultNotaryIdentity: <Error class: unknown class>

Returns the identity of the single notary on the network. Throws if there are none or more than one.

Link copied to clipboard
open val defaultNotaryNode: <Error class: unknown class><NodeHandle>

Returns a CordaFuture on the NodeHandle for the single-node notary on the network. Throws if there are no notaries or more than one, or if the notary is a distributed cluster.

Link copied to clipboard
Link copied to clipboard
val enableSNI: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
lateinit var networkMapAvailability: <Error class: unknown class><DriverDSLImpl.LocalNetworkMap?>

Future which completes when the network map infrastructure is available, whether a local one or one from the CZ. This future acts as a gate to prevent nodes from starting too early. The value of the future is a LocalNetworkMap object, which is null if the network map is being provided by the CZ.

Link copied to clipboard
val networkParameters: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
open override val notaryHandles: List<NotaryHandle>

Returns a list of NotaryHandles matching the list of NotarySpecs passed into driver.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val shutdownManager: ShutdownManager
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun DriverDSL.assertUncompletedCheckpoints(name: <Error class: unknown class>, expected: Long)
Link copied to clipboard
open override fun baseDirectory(nodeName: <Error class: unknown class>): Path

Returns the base directory for a node with the given CordaX500Name. This method is useful if the base directory is needed before the node is started.

Link copied to clipboard
open fun nextPort(): Int

Returns the next port to use when instantiating test processes that must not conflict on the same machine

Link copied to clipboard
open override fun <A> pollUntilNonNull(pollName: String, pollInterval: Duration, warnCount: Int, check: () -> A?): <Error class: unknown class><A>

Polls a function until it returns a non-null value. Note that there is no timeout on the polling.

Link copied to clipboard
open fun pollUntilTrue(pollName: String, pollInterval: Duration = DEFAULT_POLL_INTERVAL, warnCount: Int = DEFAULT_WARN_COUNT, check: () -> Boolean): <Error class: unknown class><Unit>

Polls the given function until it returns true.

Link copied to clipboard
open override fun shutdown()
Link copied to clipboard
open override fun start()
Link copied to clipboard
open fun startNode(): <Error class: unknown class><NodeHandle>

Start a node using the default values of NodeParameters.

open fun startNode(defaultParameters: NodeParameters = NodeParameters(), providedName: <Error class: unknown class>? = defaultParameters.providedName, rpcUsers: List<User> = defaultParameters.rpcUsers, verifierType: VerifierType = defaultParameters.verifierType, customOverrides: Map<String, Any?> = defaultParameters.customOverrides, startInSameProcess: Boolean? = defaultParameters.startInSameProcess, maximumHeapSize: String = defaultParameters.maximumHeapSize): <Error class: unknown class><NodeHandle>
open fun startNode(defaultParameters: NodeParameters = NodeParameters(), providedName: <Error class: unknown class>? = defaultParameters.providedName, rpcUsers: List<User> = defaultParameters.rpcUsers, verifierType: VerifierType = defaultParameters.verifierType, customOverrides: Map<String, Any?> = defaultParameters.customOverrides, startInSameProcess: Boolean? = defaultParameters.startInSameProcess, maximumHeapSize: String = defaultParameters.maximumHeapSize, logLevelOverride: String? = defaultParameters.logLevelOverride): <Error class: unknown class><NodeHandle>

Start a node.

open override fun startNode(parameters: NodeParameters): <Error class: unknown class><NodeHandle>

Start a node using the parameter values of the given NodeParameters.

open override fun startNode(parameters: NodeParameters, bytemanPort: Int?): <Error class: unknown class><NodeHandle>
Link copied to clipboard
fun DriverDSL.startNode(providedName: <Error class: unknown class>, devMode: Boolean, parameters: NodeParameters = NodeParameters()): <Error class: unknown class><NodeHandle>
Link copied to clipboard
open fun startWebserver(handle: NodeHandle): <Error class: unknown class><WebserverHandle>

Call startWebserver with a default maximumHeapSize.

open override fun startWebserver(handle: NodeHandle, maximumHeapSize: String): <Error class: unknown class><WebserverHandle>

Starts a web server for a node

Link copied to clipboard
fun <T> DriverDSL.withDatabaseConnection(name: <Error class: unknown class>, block: (Connection) -> T): T