mirror of
https://github.com/corda/corda.git
synced 2024-12-19 13:08:04 +00:00
Changed the wither methods in DriverParameters and NodeParameters to begin with "with" and not "set" (#2570)
This commit is contained in:
parent
dc268ebe63
commit
ad959c7af1
@ -3675,7 +3675,6 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.PortAllocation getDebugPortAllocation()
|
||||
@org.jetbrains.annotations.NotNull public final java.nio.file.Path getDriverDirectory()
|
||||
@org.jetbrains.annotations.NotNull public final List getExtraCordappPackagesToScan()
|
||||
public final boolean getInitialiseSerialization()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.JmxPolicy getJmxPolicy()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters getNetworkParameters()
|
||||
@org.jetbrains.annotations.NotNull public final List getNotarySpecs()
|
||||
@ -3686,19 +3685,18 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O
|
||||
public final boolean getWaitForAllNodesToFinish()
|
||||
public int hashCode()
|
||||
public final boolean isDebug()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setDebugPortAllocation(net.corda.testing.driver.PortAllocation)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setDriverDirectory(java.nio.file.Path)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setExtraCordappPackagesToScan(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setInitialiseSerialization(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setIsDebug(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setJmxPolicy(net.corda.testing.driver.JmxPolicy)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setNotarySpecs(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setPortAllocation(net.corda.testing.driver.PortAllocation)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setStartNodesInProcess(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setSystemProperties(Map)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setUseTestClock(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters setWaitForAllNodesToFinish(boolean)
|
||||
public String toString()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withDebugPortAllocation(net.corda.testing.driver.PortAllocation)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withDriverDirectory(java.nio.file.Path)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withExtraCordappPackagesToScan(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withIsDebug(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withJmxPolicy(net.corda.testing.driver.JmxPolicy)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withNotarySpecs(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withPortAllocation(net.corda.testing.driver.PortAllocation)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withStartNodesInProcess(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withSystemProperties(Map)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withUseTestClock(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters withWaitForAllNodesToFinish(boolean)
|
||||
##
|
||||
@net.corda.core.DoNotImplement public interface net.corda.testing.driver.InProcess extends net.corda.testing.driver.NodeHandle
|
||||
@org.jetbrains.annotations.NotNull public abstract net.corda.node.services.api.StartedNodeServices getServices()
|
||||
@ -3743,13 +3741,13 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj
|
||||
@org.jetbrains.annotations.Nullable public final Boolean getStartInSameProcess()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.node.services.config.VerifierType getVerifierType()
|
||||
public int hashCode()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setCustomerOverrides(Map)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setMaximumHeapSize(String)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setProvidedName(net.corda.core.identity.CordaX500Name)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setRpcUsers(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setStartInSameProcess(Boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters setVerifierType(net.corda.node.services.config.VerifierType)
|
||||
public String toString()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withCustomerOverrides(Map)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withMaximumHeapSize(String)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withProvidedName(net.corda.core.identity.CordaX500Name)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withRpcUsers(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withStartInSameProcess(Boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.driver.NodeParameters withVerifierType(net.corda.node.services.config.VerifierType)
|
||||
##
|
||||
public final class net.corda.testing.driver.NotaryHandle extends java.lang.Object
|
||||
public <init>(net.corda.core.identity.Party, boolean, net.corda.core.concurrent.CordaFuture)
|
||||
@ -3911,7 +3909,7 @@ public final class net.corda.testing.node.MockKeyManagementService extends net.c
|
||||
public class net.corda.testing.node.MockNetwork extends java.lang.Object
|
||||
public <init>(List)
|
||||
public <init>(List, net.corda.testing.node.MockNetworkParameters)
|
||||
public <init>(List, net.corda.testing.node.MockNetworkParameters, boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, boolean, List, net.corda.core.node.NetworkParameters)
|
||||
public <init>(List, net.corda.testing.node.MockNetworkParameters, boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, List, net.corda.core.node.NetworkParameters)
|
||||
@org.jetbrains.annotations.NotNull public final java.nio.file.Path baseDirectory(int)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.StartedMockNode createNode()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.StartedMockNode createNode(net.corda.core.identity.CordaX500Name)
|
||||
@ -3932,7 +3930,6 @@ public class net.corda.testing.node.MockNetwork extends java.lang.Object
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.identity.Party getDefaultNotaryIdentity()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.StartedMockNode getDefaultNotaryNode()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters getDefaultParameters()
|
||||
public final boolean getInitialiseSerialization()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters getNetworkParameters()
|
||||
public final boolean getNetworkSendManuallyPumped()
|
||||
public final int getNextNodeId()
|
||||
@ -3960,29 +3957,26 @@ public final class net.corda.testing.node.MockNetworkNotarySpec extends java.lan
|
||||
##
|
||||
public final class net.corda.testing.node.MockNetworkParameters extends java.lang.Object
|
||||
public <init>()
|
||||
public <init>(boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, boolean, List, net.corda.core.node.NetworkParameters)
|
||||
public <init>(boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, List, net.corda.core.node.NetworkParameters)
|
||||
public final boolean component1()
|
||||
public final boolean component2()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy component3()
|
||||
public final boolean component4()
|
||||
@org.jetbrains.annotations.NotNull public final List component5()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters component6()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters copy(boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, boolean, List, net.corda.core.node.NetworkParameters)
|
||||
@org.jetbrains.annotations.NotNull public final List component4()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters component5()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters copy(boolean, boolean, net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy, List, net.corda.core.node.NetworkParameters)
|
||||
public boolean equals(Object)
|
||||
public final boolean getInitialiseSerialization()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters getNetworkParameters()
|
||||
public final boolean getNetworkSendManuallyPumped()
|
||||
@org.jetbrains.annotations.NotNull public final List getNotarySpecs()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy getServicePeerAllocationStrategy()
|
||||
public final boolean getThreadPerNode()
|
||||
public int hashCode()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setInitialiseSerialization(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setNetworkParameters(net.corda.core.node.NetworkParameters)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setNetworkSendManuallyPumped(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setNotarySpecs(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setServicePeerAllocationStrategy(net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters setThreadPerNode(boolean)
|
||||
public String toString()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters withNetworkParameters(net.corda.core.node.NetworkParameters)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters withNetworkSendManuallyPumped(boolean)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters withNotarySpecs(List)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters withServicePeerAllocationStrategy(net.corda.testing.node.InMemoryMessagingNetwork$ServicePeerAllocationStrategy)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNetworkParameters withThreadPerNode(boolean)
|
||||
##
|
||||
public final class net.corda.testing.node.MockNodeParameters extends java.lang.Object
|
||||
public <init>()
|
||||
@ -4000,11 +3994,11 @@ public final class net.corda.testing.node.MockNodeParameters extends java.lang.O
|
||||
@org.jetbrains.annotations.Nullable public final net.corda.core.identity.CordaX500Name getLegalName()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.node.VersionInfo getVersion()
|
||||
public int hashCode()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters setConfigOverrides(kotlin.jvm.functions.Function1)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters setEntropyRoot(java.math.BigInteger)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters setForcedID(Integer)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters setLegalName(net.corda.core.identity.CordaX500Name)
|
||||
public String toString()
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters withConfigOverrides(kotlin.jvm.functions.Function1)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters withEntropyRoot(java.math.BigInteger)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters withForcedID(Integer)
|
||||
@org.jetbrains.annotations.NotNull public final net.corda.testing.node.MockNodeParameters withLegalName(net.corda.core.identity.CordaX500Name)
|
||||
##
|
||||
public class net.corda.testing.node.MockServices extends java.lang.Object implements net.corda.core.node.StateLoader, net.corda.core.node.ServiceHub
|
||||
public <init>()
|
||||
|
@ -101,12 +101,12 @@ data class NodeParameters(
|
||||
val startInSameProcess: Boolean? = null,
|
||||
val maximumHeapSize: String = "200m"
|
||||
) {
|
||||
fun setProvidedName(providedName: CordaX500Name?): NodeParameters = copy(providedName = providedName)
|
||||
fun setRpcUsers(rpcUsers: List<User>): NodeParameters = copy(rpcUsers = rpcUsers)
|
||||
fun setVerifierType(verifierType: VerifierType): NodeParameters = copy(verifierType = verifierType)
|
||||
fun setCustomerOverrides(customOverrides: Map<String, Any?>): NodeParameters = copy(customOverrides = customOverrides)
|
||||
fun setStartInSameProcess(startInSameProcess: Boolean?): NodeParameters = copy(startInSameProcess = startInSameProcess)
|
||||
fun setMaximumHeapSize(maximumHeapSize: String): NodeParameters = copy(maximumHeapSize = maximumHeapSize)
|
||||
fun withProvidedName(providedName: CordaX500Name?): NodeParameters = copy(providedName = providedName)
|
||||
fun withRpcUsers(rpcUsers: List<User>): NodeParameters = copy(rpcUsers = rpcUsers)
|
||||
fun withVerifierType(verifierType: VerifierType): NodeParameters = copy(verifierType = verifierType)
|
||||
fun withCustomerOverrides(customOverrides: Map<String, Any?>): NodeParameters = copy(customOverrides = customOverrides)
|
||||
fun withStartInSameProcess(startInSameProcess: Boolean?): NodeParameters = copy(startInSameProcess = startInSameProcess)
|
||||
fun withMaximumHeapSize(maximumHeapSize: String): NodeParameters = copy(maximumHeapSize = maximumHeapSize)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -197,17 +197,17 @@ data class DriverParameters(
|
||||
val jmxPolicy: JmxPolicy = JmxPolicy(),
|
||||
val networkParameters: NetworkParameters = testNetworkParameters()
|
||||
) {
|
||||
fun setIsDebug(isDebug: Boolean): DriverParameters = copy(isDebug = isDebug)
|
||||
fun setDriverDirectory(driverDirectory: Path): DriverParameters = copy(driverDirectory = driverDirectory)
|
||||
fun setPortAllocation(portAllocation: PortAllocation): DriverParameters = copy(portAllocation = portAllocation)
|
||||
fun setDebugPortAllocation(debugPortAllocation: PortAllocation): DriverParameters = copy(debugPortAllocation = debugPortAllocation)
|
||||
fun setSystemProperties(systemProperties: Map<String, String>): DriverParameters = copy(systemProperties = systemProperties)
|
||||
fun setUseTestClock(useTestClock: Boolean): DriverParameters = copy(useTestClock = useTestClock)
|
||||
fun setInitialiseSerialization(initialiseSerialization: Boolean): DriverParameters = copy(initialiseSerialization = initialiseSerialization)
|
||||
fun setStartNodesInProcess(startNodesInProcess: Boolean): DriverParameters = copy(startNodesInProcess = startNodesInProcess)
|
||||
fun setWaitForAllNodesToFinish(waitForAllNodesToFinish: Boolean): DriverParameters = copy(waitForAllNodesToFinish = waitForAllNodesToFinish)
|
||||
fun setNotarySpecs(notarySpecs: List<NotarySpec>): DriverParameters = copy(notarySpecs = notarySpecs)
|
||||
fun setExtraCordappPackagesToScan(extraCordappPackagesToScan: List<String>): DriverParameters = copy(extraCordappPackagesToScan = extraCordappPackagesToScan)
|
||||
fun setJmxPolicy(jmxPolicy: JmxPolicy): DriverParameters = copy(jmxPolicy = jmxPolicy)
|
||||
fun setNetworkParameters(networkParameters: NetworkParameters): DriverParameters = copy(networkParameters = networkParameters)
|
||||
fun withIsDebug(isDebug: Boolean): DriverParameters = copy(isDebug = isDebug)
|
||||
fun withDriverDirectory(driverDirectory: Path): DriverParameters = copy(driverDirectory = driverDirectory)
|
||||
fun withPortAllocation(portAllocation: PortAllocation): DriverParameters = copy(portAllocation = portAllocation)
|
||||
fun withDebugPortAllocation(debugPortAllocation: PortAllocation): DriverParameters = copy(debugPortAllocation = debugPortAllocation)
|
||||
fun withSystemProperties(systemProperties: Map<String, String>): DriverParameters = copy(systemProperties = systemProperties)
|
||||
fun withUseTestClock(useTestClock: Boolean): DriverParameters = copy(useTestClock = useTestClock)
|
||||
fun withInitialiseSerialization(initialiseSerialization: Boolean): DriverParameters = copy(initialiseSerialization = initialiseSerialization)
|
||||
fun withStartNodesInProcess(startNodesInProcess: Boolean): DriverParameters = copy(startNodesInProcess = startNodesInProcess)
|
||||
fun withWaitForAllNodesToFinish(waitForAllNodesToFinish: Boolean): DriverParameters = copy(waitForAllNodesToFinish = waitForAllNodesToFinish)
|
||||
fun withNotarySpecs(notarySpecs: List<NotarySpec>): DriverParameters = copy(notarySpecs = notarySpecs)
|
||||
fun withExtraCordappPackagesToScan(extraCordappPackagesToScan: List<String>): DriverParameters = copy(extraCordappPackagesToScan = extraCordappPackagesToScan)
|
||||
fun withJmxPolicy(jmxPolicy: JmxPolicy): DriverParameters = copy(jmxPolicy = jmxPolicy)
|
||||
fun withNetworkParameters(networkParameters: NetworkParameters): DriverParameters = copy(networkParameters = networkParameters)
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ data class MockNodeParameters(
|
||||
* is used by multiple nodes. You rarely if ever need to change that, it's primarily of interest to people testing
|
||||
* notary code.
|
||||
* @property notarySpecs The notaries to use in the mock network. By default you get one mock notary and that is usually sufficient.
|
||||
* @property networkParameters The network parameters to be used by all the nodes. [NetworkParameters.notaries] must be
|
||||
* empty as notaries are defined by [notarySpecs].
|
||||
*/
|
||||
@Suppress("unused")
|
||||
data class MockNetworkParameters(
|
||||
@ -66,7 +68,8 @@ data class MockNetworkParameters(
|
||||
val threadPerNode: Boolean = false,
|
||||
val servicePeerAllocationStrategy: InMemoryMessagingNetwork.ServicePeerAllocationStrategy = InMemoryMessagingNetwork.ServicePeerAllocationStrategy.Random(),
|
||||
val notarySpecs: List<MockNetworkNotarySpec> = listOf(MockNetworkNotarySpec(DUMMY_NOTARY_NAME)),
|
||||
val networkParameters: NetworkParameters = testNetworkParameters()) {
|
||||
val networkParameters: NetworkParameters = testNetworkParameters()
|
||||
) {
|
||||
fun withNetworkParameters(networkParameters: NetworkParameters): MockNetworkParameters = copy(networkParameters = networkParameters)
|
||||
fun withNetworkSendManuallyPumped(networkSendManuallyPumped: Boolean): MockNetworkParameters = copy(networkSendManuallyPumped = networkSendManuallyPumped)
|
||||
fun withThreadPerNode(threadPerNode: Boolean): MockNetworkParameters = copy(threadPerNode = threadPerNode)
|
||||
|
Loading…
Reference in New Issue
Block a user