Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Cleipnir.ResilientFunctions.CoreRuntime.Invocation;
using Cleipnir.ResilientFunctions.Domain;
using Cleipnir.ResilientFunctions.Messaging;
using Cleipnir.ResilientFunctions.Storage;
Expand All @@ -22,7 +21,6 @@ public class CrashableFunctionStore : IFunctionStore
private readonly CrashableEffectStore _crashableEffectStore;
public IEffectsStore EffectsStore => _crashableEffectStore;
public ICorrelationStore CorrelationStore => _crashed ? throw new TimeoutException() : _inner.CorrelationStore;
public Utilities Utilities => _crashed ? throw new TimeoutException() : _inner.Utilities;
public IReplicaStore ReplicaStore => _crashed ? throw new TimeoutException() : _inner.ReplicaStore;

public CrashableFunctionStore(IFunctionStore inner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ public class Invoker<TParam, TReturn>

private readonly InvocationHelper<TParam, TReturn> _invocationHelper;
private readonly UnhandledExceptionHandler _unhandledExceptionHandler;
private readonly Utilities _utilities;
private readonly FlowsManager _flowsManager;

internal Invoker(
FlowType flowType, StoredType storedType,
Func<TParam, Workflow, Task<Result<TReturn>>> inner,
InvocationHelper<TParam, TReturn> invocationHelper,
UnhandledExceptionHandler unhandledExceptionHandler,
Utilities utilities,
ReplicaId replicaId,
FlowsManager flowsManager
)
Expand All @@ -39,7 +37,6 @@ FlowsManager flowsManager
_inner = inner;
_invocationHelper = invocationHelper;
_unhandledExceptionHandler = unhandledExceptionHandler;
_utilities = utilities;
_flowsManager = flowsManager;
}

Expand Down Expand Up @@ -289,7 +286,7 @@ await _invocationHelper.PersistFunctionInStore(
var queueManager = _invocationHelper.CreateQueueManager(flowId, storedId, effect, flowState, flowTimeouts, _unhandledExceptionHandler);
disposables.Add(queueManager);
var messageWriter = _invocationHelper.CreateMessageWriter(storedId);
var workflow = new Workflow(flowId, storedId, effect, _utilities, correlations, queueManager, _invocationHelper.UtcNow, messageWriter);
var workflow = new Workflow(flowId, storedId, effect, correlations, queueManager, _invocationHelper.UtcNow, messageWriter);

return new PreparedInvocation(
persisted,
Expand Down Expand Up @@ -346,7 +343,6 @@ private async Task<PreparedReInvocation> PrepareForReInvocation(StoredId storedI
flowId,
storedId,
effect,
_utilities,
correlations,
queueManager,
_invocationHelper.UtcNow,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ public class Workflow
public FlowId FlowId { get; }
internal StoredId StoredId { get; }
public Effect Effect { get; }
public Utilities Utilities { get; }
public Correlations Correlations { get; }

private QueueManager _queueManager;
private readonly UtcNow _utcNow;
private MessageWriter MessageWriter { get; }


public Workflow(FlowId flowId, StoredId storedId, Effect effect, Utilities utilities, Correlations correlations, QueueManager queueManager, UtcNow utcNow, MessageWriter messageWriter)
public Workflow(FlowId flowId, StoredId storedId, Effect effect, Correlations correlations, QueueManager queueManager, UtcNow utcNow, MessageWriter messageWriter)
{
FlowId = flowId;
StoredId = storedId;
Utilities = utilities;
Effect = effect;
Correlations = correlations;
_queueManager = queueManager;
Expand Down
3 changes: 0 additions & 3 deletions Core/Cleipnir.ResilientFunctions/FunctionsRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public FuncRegistration<TParam, TReturn> RegisterFunc<TParam, TReturn>(
inner,
invocationHelper,
settingsWithDefaults.UnhandledExceptionHandler,
_functionStore.Utilities,
ClusterInfo.ReplicaId,
_flowsManager
);
Expand Down Expand Up @@ -318,7 +317,6 @@ private ParamlessRegistration RegisterParamless(
inner,
invocationHelper,
settingsWithDefaults.UnhandledExceptionHandler,
_functionStore.Utilities,
ClusterInfo.ReplicaId,
_flowsManager
);
Expand Down Expand Up @@ -408,7 +406,6 @@ public ActionRegistration<TParam> RegisterAction<TParam>(
inner,
invocationHelper,
settingsWithDefaults.UnhandledExceptionHandler,
_functionStore.Utilities,
ClusterInfo.ReplicaId,
_flowsManager
);
Expand Down
2 changes: 0 additions & 2 deletions Core/Cleipnir.ResilientFunctions/Storage/IFunctionStore.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Cleipnir.ResilientFunctions.CoreRuntime.Invocation;
using Cleipnir.ResilientFunctions.Domain;
using Cleipnir.ResilientFunctions.Messaging;
using Cleipnir.ResilientFunctions.Storage.Session;
Expand All @@ -13,7 +12,6 @@ public interface IFunctionStore
public IMessageStore MessageStore { get; }
public IEffectsStore EffectsStore { get; }
public ICorrelationStore CorrelationStore { get; }
public Utilities Utilities { get; }
public IReplicaStore ReplicaStore { get; }
public Task Initialize();

Expand Down
10 changes: 0 additions & 10 deletions Core/Cleipnir.ResilientFunctions/Storage/InMemoryFunctionStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Cleipnir.ResilientFunctions.CoreRuntime.Invocation;
using Cleipnir.ResilientFunctions.Domain;
using Cleipnir.ResilientFunctions.Helpers;
using Cleipnir.ResilientFunctions.Messaging;
using Cleipnir.ResilientFunctions.Storage.Session;
using Cleipnir.ResilientFunctions.Utils;
using Cleipnir.ResilientFunctions.Utils.Register;

namespace Cleipnir.ResilientFunctions.Storage;

Expand All @@ -25,17 +22,10 @@ public class InMemoryFunctionStore : IFunctionStore, IMessageStore
public IEffectsStore EffectsStore => _effectsStore;
private readonly InMemoryCorrelationStore _correlationStore = new();
public ICorrelationStore CorrelationStore => _correlationStore;
public Utilities Utilities { get; }
public IReplicaStore ReplicaStore { get; } = new InMemoryReplicaStore();

public Task Initialize() => Task.CompletedTask;

public InMemoryFunctionStore()
{
var underlyingRegister = new UnderlyingInMemoryRegister();
Utilities = new Utilities(new Register(underlyingRegister));
}

#region FunctionStore

public virtual Task<IStorageSession?> CreateFunction(
Expand Down
13 changes: 0 additions & 13 deletions Core/Cleipnir.ResilientFunctions/Utils/IUnderlyingRegister.cs

This file was deleted.

Loading
Loading