Interface ExecutionContext
public interface ExecutionContext
Temporary interface to be able to test the leader based replication in the simulator, which implements fakes
objects.
It gives access to the changelog and the data state of the replica.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateChangelog(ReplicaClient client) Creates the changelog.newReplicatedDomain(LeaderBasedReplicationDomainCfg domainCfg, LeaderBasedReplicationSynchronizationProviderCfg syncProviderCfg, ReplicaClient coreRegistryClient) Creates a new replicated domain with the given configuration.Returns the replica id of the replica.
-
Field Details
-
EMPTY_EXECUTION_CONTEXT
An empty execution context.
-
-
Method Details
-
createChangelog
Creates the changelog.- Parameters:
client- the replica client to communicate with the rest of the topology- Returns:
- the created changelog
- Throws:
ConfigException
-
replicaId
-
newReplicatedDomain
ReplicatedDomain newReplicatedDomain(LeaderBasedReplicationDomainCfg domainCfg, LeaderBasedReplicationSynchronizationProviderCfg syncProviderCfg, ReplicaClient coreRegistryClient) Creates a new replicated domain with the given configuration.- Parameters:
domainCfg- the domain configurationsyncProviderCfg- the synchronization provider configurationcoreRegistryClient- the client to communicate with the core registry- Returns:
- the new replicated domain
-