2017-01-31 11:01:08 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-11-02 14:48:14 +00:00
|
|
|
|
using System.Linq;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Flow.Default
|
|
|
|
|
{
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Default implementation for IFlowRepository. Does not persist any state, relying on the FlowStore's cache instead.
|
|
|
|
|
/// </summary>
|
2017-08-14 11:58:01 +00:00
|
|
|
|
public class NonPersistentFlowRepository : IFlowRepository
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2022-02-09 10:26:56 +00:00
|
|
|
|
ValueTask<IEnumerable<FlowRecord<T>>> IFlowRepository.GetStates<T>()
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2022-02-09 10:26:56 +00:00
|
|
|
|
return new ValueTask<IEnumerable<FlowRecord<T>>>(Enumerable.Empty<FlowRecord<T>>());
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2022-02-09 10:26:56 +00:00
|
|
|
|
public ValueTask CreateState<T>(Guid flowID, T state, DateTime timestamp)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2022-02-09 10:26:56 +00:00
|
|
|
|
return default;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2022-02-09 10:26:56 +00:00
|
|
|
|
public ValueTask UpdateState<T>(Guid flowID, T state)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2022-02-09 10:26:56 +00:00
|
|
|
|
return default;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2022-02-09 10:26:56 +00:00
|
|
|
|
public ValueTask DeleteState(Guid flowID)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2022-02-09 10:26:56 +00:00
|
|
|
|
return default;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|