abstract class AbstractNode : SingletonSerializeAsToken
A base node implementation that can be customised either for production (with real implementations that do real I/O), or a mock implementation suitable for unit test environments.
Marked as SingletonSerializeAsToken to prevent the invisible reference to AbstractNode in the ServiceHub accidentally sweeping up the Node into the Kryo checkpoint serialization via any flows holding a reference to ServiceHub.
DatabaseConfigurationException |
class DatabaseConfigurationException : Exception |
<init> |
AbstractNode(configuration: NodeConfiguration, advertisedServices: Set<ServiceInfo>, platformClock: Clock, busyNodeLatch: ReusableLatch = ReusableLatch())
A base node implementation that can be customised either for production (with real implementations that do real I/O), or a mock implementation suitable for unit test environments. |
_networkMapRegistrationFuture |
val _networkMapRegistrationFuture: SettableFuture<Unit> |
_servicesThatAcceptUploads |
val _servicesThatAcceptUploads: ArrayList<AcceptsFileUpload> |
advertisedServices |
val advertisedServices: Set<ServiceInfo> |
api |
lateinit var api: APIServer |
busyNodeLatch |
val busyNodeLatch: ReusableLatch |
checkpointStorage |
lateinit var checkpointStorage: CheckpointStorage |
configuration |
open val configuration: NodeConfiguration |
customServices |
val customServices: ArrayList<Any> |
database |
lateinit var database: Database |
dbCloser |
var dbCloser: Runnable? |
flowLogicFactory |
lateinit var flowLogicFactory: FlowLogicRefFactory |
identity |
lateinit var identity: IdentityService |
inNodeNetworkMapService |
var inNodeNetworkMapService: NetworkMapService? |
inNodeNotaryService |
var inNodeNotaryService: NotaryService? |
info |
lateinit var info: NodeInfo |
isPreviousCheckpointsPresent |
var isPreviousCheckpointsPresent: Boolean |
keyManagement |
lateinit var keyManagement: KeyManagementService |
log |
abstract val log: Logger |
net |
lateinit var net: MessagingServiceInternal |
netMapCache |
lateinit var netMapCache: NetworkMapCache |
networkMapAddress |
abstract val networkMapAddress: SingleMessageRecipient? |
networkMapRegistrationFuture |
val networkMapRegistrationFuture: ListenableFuture<Unit>
Completes once the node has successfully registered with the network map service |
networkMapSeq |
var networkMapSeq: Long
Sequence number of changes sent to the network map service, when registering/de-registering this node. |
partyKeys |
val partyKeys: MutableSet<KeyPair> |
platformClock |
val platformClock: Clock |
pluginRegistries |
open val pluginRegistries: List<CordaPluginRegistry>
Fetch CordaPluginRegistry classes registered in META-INF/services/net.corda.core.node.CordaPluginRegistry files that exist in the classpath |
runOnStop |
val runOnStop: ArrayList<Runnable> |
scheduler |
lateinit var scheduler: NodeSchedulerService |
schemas |
lateinit var schemas: SchemaService |
serverThread |
abstract val serverThread: AffinityExecutor |
services |
val services: ServiceHubInternal |
servicesThatAcceptUploads |
val servicesThatAcceptUploads: List<AcceptsFileUpload> |
smm |
lateinit var smm: StateMachineManager |
started |
var started: Boolean
Set to true once start has been successfully called. |
storage |
lateinit var storage: TxWritableStorageService |
uniquenessProvider |
var uniquenessProvider: UniquenessProvider? |
vault |
lateinit var vault: VaultService |
acceptableLiveFiberCountOnStop |
open fun acceptableLiveFiberCountOnStop(): Int |
constructStorageService |
open fun constructStorageService(attachments: NodeAttachmentService, transactionStorage: TransactionStorage, stateMachineRecordedTransactionMappingStorage: StateMachineRecordedTransactionMappingStorage): StorageServiceImpl |
createNodeDir |
fun createNodeDir(): Unit |
findMyLocation |
open fun findMyLocation(): PhysicalLocation? |
findService |
fun <T : Any> findService(): T
Locates and returns a service of the given type if loaded, or throws an exception if not found. |
generateKeyPair |
open fun generateKeyPair(): KeyPair |
initialiseDatabasePersistence |
open fun initialiseDatabasePersistence(insideTransaction: () -> Unit): Unit |
initialiseStorageService |
open fun initialiseStorageService(dir: Path): Pair<TxWritableStorageService, CheckpointStorage> |
makeAttachmentStorage |
fun makeAttachmentStorage(dir: Path): NodeAttachmentService |
makeIdentityService |
open fun makeIdentityService(): IdentityService |
makeKeyManagementService |
open fun makeKeyManagementService(): KeyManagementService |
makeMessagingService |
abstract fun makeMessagingService(): MessagingServiceInternal |
makeNetworkMapService |
open fun makeNetworkMapService(): Unit |
makeNotaryService |
open fun makeNotaryService(type: ServiceType): NotaryService |
makeSchemaService |
open fun makeSchemaService(): SchemaService |
makeServiceEntries |
fun makeServiceEntries(): List<ServiceEntry>
A service entry contains the advertised ServiceInfo along with the service identity. The identity |
makeUniquenessProvider |
abstract fun makeUniquenessProvider(type: ServiceType): UniquenessProvider |
makeVaultService |
open fun makeVaultService(): VaultService |
noNetworkMapConfigured |
open fun noNetworkMapConfigured(): ListenableFuture<Unit>
This is overriden by the mock node implementation to enable operation without any network map service |
obtainLegalIdentity |
fun obtainLegalIdentity(): Party |
obtainLegalIdentityKey |
fun obtainLegalIdentityKey(): KeyPair |
registerWithNetworkMap |
open fun registerWithNetworkMap(): ListenableFuture<Unit>
Register this node with the network map cache, and load network map from a remote service (and register for updates) if one has been supplied. |
setup |
open fun setup(): AbstractNode
Run any tasks that are needed to ensure the node is in a correct state before running start(). |
start |
open fun start(): AbstractNode |
startMessagingService |
abstract fun startMessagingService(rpcOps: RPCOps): Unit |
stop |
open fun stop(): Unit |
toToken |
open fun toToken(context: SerializeAsTokenContext): SerializationToken |
PRIVATE_KEY_FILE_NAME |
val PRIVATE_KEY_FILE_NAME: String |
PUBLIC_IDENTITY_FILE_NAME |
val PUBLIC_IDENTITY_FILE_NAME: String |
defaultFlowWhiteList |
val defaultFlowWhiteList: Map<Class<out FlowLogic<*>>, Set<Class<*>>> |
Node |
class Node : AbstractNode
A Node manages a standalone server that takes part in the P2P network. It creates the services found in ServiceHub, loads important data off disk and starts listening for connections. |