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