mirror of
https://github.com/corda/corda.git
synced 2025-01-02 19:26:47 +00:00
Remove scheduler service from ServiceHub
This commit is contained in:
parent
e22ad19fcd
commit
b3b4457b4e
@ -39,7 +39,6 @@ interface ServiceHub : ServicesForResolution {
|
|||||||
val keyManagementService: KeyManagementService
|
val keyManagementService: KeyManagementService
|
||||||
override val storageService: StorageService
|
override val storageService: StorageService
|
||||||
val networkMapCache: NetworkMapCache
|
val networkMapCache: NetworkMapCache
|
||||||
val schedulerService: SchedulerService
|
|
||||||
val transactionVerifierService: TransactionVerifierService
|
val transactionVerifierService: TransactionVerifierService
|
||||||
val clock: Clock
|
val clock: Clock
|
||||||
val myInfo: NodeInfo
|
val myInfo: NodeInfo
|
||||||
|
@ -363,28 +363,6 @@ interface TxWritableStorageService : StorageService {
|
|||||||
override val validatedTransactions: TransactionStorage
|
override val validatedTransactions: TransactionStorage
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides access to schedule activity at some point in time. This interface might well be expanded to
|
|
||||||
* increase the feature set in the future.
|
|
||||||
*
|
|
||||||
* If the point in time is in the past, the expectation is that the activity will happen shortly after it is scheduled.
|
|
||||||
*
|
|
||||||
* The main consumer initially is an observer of the vault to schedule activities based on transactions as they are
|
|
||||||
* recorded.
|
|
||||||
*/
|
|
||||||
interface SchedulerService {
|
|
||||||
/**
|
|
||||||
* Schedule a new activity for a TX output, probably because it was just produced.
|
|
||||||
*
|
|
||||||
* Only one activity can be scheduled for a particular [StateRef] at any one time. Scheduling a [ScheduledStateRef]
|
|
||||||
* replaces any previously scheduled [ScheduledStateRef] for any one [StateRef].
|
|
||||||
*/
|
|
||||||
fun scheduleStateActivity(action: ScheduledStateRef)
|
|
||||||
|
|
||||||
/** Unschedule all activity for a TX output, probably because it was consumed. */
|
|
||||||
fun unscheduleStateActivity(ref: StateRef)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides verification service. The implementation may be a simple in-memory verify() call or perhaps an IPC/RPC.
|
* Provides verification service. The implementation may be a simple in-memory verify() call or perhaps an IPC/RPC.
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package net.corda.node.services.api
|
||||||
|
|
||||||
|
import net.corda.core.contracts.ScheduledStateRef
|
||||||
|
import net.corda.core.contracts.StateRef
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides access to schedule activity at some point in time. This interface might well be expanded to
|
||||||
|
* increase the feature set in the future.
|
||||||
|
*
|
||||||
|
* If the point in time is in the past, the expectation is that the activity will happen shortly after it is scheduled.
|
||||||
|
*
|
||||||
|
* The main consumer initially is an observer of the vault to schedule activities based on transactions as they are
|
||||||
|
* recorded.
|
||||||
|
*/
|
||||||
|
interface SchedulerService {
|
||||||
|
/**
|
||||||
|
* Schedule a new activity for a TX output, probably because it was just produced.
|
||||||
|
*
|
||||||
|
* Only one activity can be scheduled for a particular [StateRef] at any one time. Scheduling a [ScheduledStateRef]
|
||||||
|
* replaces any previously scheduled [ScheduledStateRef] for any one [StateRef].
|
||||||
|
*/
|
||||||
|
fun scheduleStateActivity(action: ScheduledStateRef)
|
||||||
|
|
||||||
|
/** Unschedule all activity for a TX output, probably because it was consumed. */
|
||||||
|
fun unscheduleStateActivity(ref: StateRef)
|
||||||
|
}
|
@ -65,6 +65,7 @@ abstract class ServiceHubInternal : PluginServiceHub {
|
|||||||
abstract val flowLogicRefFactory: FlowLogicRefFactory
|
abstract val flowLogicRefFactory: FlowLogicRefFactory
|
||||||
abstract val schemaService: SchemaService
|
abstract val schemaService: SchemaService
|
||||||
abstract override val networkMapCache: NetworkMapCacheInternal
|
abstract override val networkMapCache: NetworkMapCacheInternal
|
||||||
|
abstract val schedulerService: SchedulerService
|
||||||
|
|
||||||
abstract val networkService: MessagingService
|
abstract val networkService: MessagingService
|
||||||
|
|
||||||
|
@ -10,15 +10,14 @@ import net.corda.core.contracts.StateRef
|
|||||||
import net.corda.core.flows.FlowInitiator
|
import net.corda.core.flows.FlowInitiator
|
||||||
import net.corda.core.flows.FlowLogic
|
import net.corda.core.flows.FlowLogic
|
||||||
import net.corda.core.flows.FlowLogicRefFactory
|
import net.corda.core.flows.FlowLogicRefFactory
|
||||||
import net.corda.core.node.services.SchedulerService
|
|
||||||
import net.corda.core.serialization.SingletonSerializeAsToken
|
import net.corda.core.serialization.SingletonSerializeAsToken
|
||||||
import net.corda.core.utilities.ProgressTracker
|
import net.corda.core.utilities.ProgressTracker
|
||||||
import net.corda.core.utilities.loggerFor
|
import net.corda.core.utilities.loggerFor
|
||||||
import net.corda.core.utilities.trace
|
import net.corda.core.utilities.trace
|
||||||
|
import net.corda.node.services.api.SchedulerService
|
||||||
import net.corda.node.services.api.ServiceHubInternal
|
import net.corda.node.services.api.ServiceHubInternal
|
||||||
import net.corda.node.utilities.*
|
import net.corda.node.utilities.*
|
||||||
import org.apache.activemq.artemis.utils.ReusableLatch
|
import org.apache.activemq.artemis.utils.ReusableLatch
|
||||||
import org.jetbrains.exposed.sql.Database
|
|
||||||
import org.jetbrains.exposed.sql.ResultRow
|
import org.jetbrains.exposed.sql.ResultRow
|
||||||
import org.jetbrains.exposed.sql.statements.InsertStatement
|
import org.jetbrains.exposed.sql.statements.InsertStatement
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
@ -11,10 +11,7 @@ import net.corda.core.node.services.*
|
|||||||
import net.corda.core.transactions.SignedTransaction
|
import net.corda.core.transactions.SignedTransaction
|
||||||
import net.corda.node.internal.ServiceFlowInfo
|
import net.corda.node.internal.ServiceFlowInfo
|
||||||
import net.corda.node.serialization.NodeClock
|
import net.corda.node.serialization.NodeClock
|
||||||
import net.corda.node.services.api.MonitoringService
|
import net.corda.node.services.api.*
|
||||||
import net.corda.node.services.api.NetworkMapCacheInternal
|
|
||||||
import net.corda.node.services.api.SchemaService
|
|
||||||
import net.corda.node.services.api.ServiceHubInternal
|
|
||||||
import net.corda.node.services.messaging.MessagingService
|
import net.corda.node.services.messaging.MessagingService
|
||||||
import net.corda.node.services.schema.NodeSchemaService
|
import net.corda.node.services.schema.NodeSchemaService
|
||||||
import net.corda.node.services.statemachine.StateMachineManager
|
import net.corda.node.services.statemachine.StateMachineManager
|
||||||
|
@ -59,7 +59,6 @@ open class MockServices(val key: KeyPair = generateKeyPair()) : ServiceHub {
|
|||||||
override val vaultService: VaultService get() = throw UnsupportedOperationException()
|
override val vaultService: VaultService get() = throw UnsupportedOperationException()
|
||||||
override val networkMapCache: NetworkMapCache get() = throw UnsupportedOperationException()
|
override val networkMapCache: NetworkMapCache get() = throw UnsupportedOperationException()
|
||||||
override val clock: Clock get() = Clock.systemUTC()
|
override val clock: Clock get() = Clock.systemUTC()
|
||||||
override val schedulerService: SchedulerService get() = throw UnsupportedOperationException()
|
|
||||||
override val myInfo: NodeInfo get() = NodeInfo(object : SingleMessageRecipient {}, Party(MEGA_CORP.name, key.public), MOCK_VERSION_INFO.platformVersion)
|
override val myInfo: NodeInfo get() = NodeInfo(object : SingleMessageRecipient {}, Party(MEGA_CORP.name, key.public), MOCK_VERSION_INFO.platformVersion)
|
||||||
override val transactionVerifierService: TransactionVerifierService get() = InMemoryTransactionVerifierService(2)
|
override val transactionVerifierService: TransactionVerifierService get() = InMemoryTransactionVerifierService(2)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user