From 05fe50d9f8268e71d7fb50aa98a79c6266a4ed22 Mon Sep 17 00:00:00 2001 From: Rick Parker Date: Mon, 24 Sep 2018 15:01:47 +0100 Subject: [PATCH] ENT-2431: Expose cache factory further down the class hierarchy of AsbtractNode. (#3984) --- node/src/main/kotlin/net/corda/node/internal/Node.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/internal/Node.kt b/node/src/main/kotlin/net/corda/node/internal/Node.kt index 7b01e18c95..c14a52d837 100644 --- a/node/src/main/kotlin/net/corda/node/internal/Node.kt +++ b/node/src/main/kotlin/net/corda/node/internal/Node.kt @@ -46,10 +46,7 @@ import net.corda.node.services.api.StartedNodeServices import net.corda.node.services.config.* import net.corda.node.services.messaging.* import net.corda.node.services.rpc.ArtemisRpcBroker -import net.corda.node.utilities.AddressUtils -import net.corda.node.utilities.AffinityExecutor -import net.corda.node.utilities.DefaultNamedCacheFactory -import net.corda.node.utilities.DemoClock +import net.corda.node.utilities.* import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.INTERNAL_SHELL_USER import net.corda.nodeapi.internal.ShutdownHook import net.corda.nodeapi.internal.addShutdownHook @@ -90,11 +87,12 @@ class NodeWithInfo(val node: Node, val info: NodeInfo) { open class Node(configuration: NodeConfiguration, versionInfo: VersionInfo, private val initialiseSerialization: Boolean = true, - cordappLoader: CordappLoader = makeCordappLoader(configuration, versionInfo) + cordappLoader: CordappLoader = makeCordappLoader(configuration, versionInfo), + cacheFactoryPrototype: NamedCacheFactory = DefaultNamedCacheFactory() ) : AbstractNode( configuration, createClock(configuration), - DefaultNamedCacheFactory(), + cacheFactoryPrototype, versionInfo, cordappLoader, // Under normal (non-test execution) it will always be "1"