public InMemoryArchive GetStatusForArchiveOperation(string requestId, ArchiveType archiveType) { InMemoryArchive summary; ArchiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out summary); return(summary); }
public bool IsOperationInProgressFor(string requestId, ArchiveType archiveType) { if (!archiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out var summary)) { return(false); } return(summary.ArchiveState != ArchiveState.ArchiveCompleted); }
InMemoryArchive GetOrCreate(ArchiveType archiveType, string requestId) { if (!archiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out var summary)) { summary = new InMemoryArchive(requestId, archiveType, domainEvents); archiveOperations[InMemoryArchive.MakeId(requestId, archiveType)] = summary; } return(summary); }
private InMemoryArchive GetOrCreate(ArchiveType archiveType, string requestId) { InMemoryArchive summary; if (!ArchiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out summary)) { summary = new InMemoryArchive(requestId, archiveType); ArchiveOperations[InMemoryArchive.MakeId(requestId, archiveType)] = summary; } return(summary); }
void RemoveArchiveOperation(string requestId, ArchiveType archiveType) { archiveOperations.Remove(InMemoryArchive.MakeId(requestId, archiveType)); }