2017-01-31 11:01:08 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Flow.Default
|
|
|
|
|
{
|
2019-08-15 14:00:04 +00:00
|
|
|
|
/// <inheritdoc />
|
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
|
|
|
|
{
|
2017-08-14 11:58:01 +00:00
|
|
|
|
Task<List<KeyValuePair<Guid, T>>> IFlowRepository.GetStates<T>()
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2017-07-27 13:55:37 +00:00
|
|
|
|
return Task.FromResult(new List<KeyValuePair<Guid, T>>());
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2017-08-14 11:58:01 +00:00
|
|
|
|
public Task CreateState<T>(Guid flowID, T state, DateTime timestamp)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2017-08-14 11:58:01 +00:00
|
|
|
|
public Task UpdateState<T>(Guid flowID, T state)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-15 09:26:55 +00:00
|
|
|
|
/// <inheritdoc />
|
2017-01-31 11:01:08 +00:00
|
|
|
|
public Task DeleteState(Guid flowID)
|
|
|
|
|
{
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|