using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Tapeti.Flow { /// /// Provides persistency for flow states. /// public interface IFlowRepository { /// /// Load the previously persisted flow states. /// /// A list of flow states, where the key is the unique Flow ID and the value is the deserialized T. Task>> GetStates(); /// /// Stores a new flow state. Guaranteed to be run in a lock for the specified flow ID. /// /// /// /// /// Task CreateState(Guid flowID, T state, DateTime timestamp); /// /// Updates an existing flow state. Guaranteed to be run in a lock for the specified flow ID. /// /// /// /// /// Task UpdateState(Guid flowID, T state); /// /// Delete a flow state. Guaranteed to be run in a lock for the specified flow ID. /// /// Task DeleteState(Guid flowID); } }