Table of Contents

Class ErasureExecutionResult

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Result of an erasure execution operation.

public sealed record ErasureExecutionResult : IEquatable<ErasureExecutionResult>
Inheritance
ErasureExecutionResult
Implements
Inherited Members

Properties

ErrorMessage

Gets the error message if execution failed.

public string? ErrorMessage { get; init; }

Property Value

string

KeysDeleted

Gets the number of encryption keys deleted.

public int KeysDeleted { get; init; }

Property Value

int

Outcome

Gets whether the erasure executed successfully.

public required ErasureExecutionOutcome Outcome { get; init; }

Property Value

ErasureExecutionOutcome

RecordsAffected

Gets the number of data records affected.

public int RecordsAffected { get; init; }

Property Value

int

Success

Gets a value indicating whether the erasure ran and covered everything it was asked to cover.

public bool Success { get; }

Property Value

bool

true only when Outcome is Succeeded; otherwise false.

Remarks

DERIVED, and no longer settable, because it cannot express what callers need to know. It reads exactly as it always did — true for a full success and false for everything else — so no existing caller's behaviour changes. What it could never say is WHY it is false, and the difference between "attempted and failed" and "declined, nothing destroyed" decides whether retrying is correct. Read Outcome for that; this remains for the common case of asking only whether the erasure is done.

Methods

CompletedExceptConcurrentWrites(int, int, string)

Creates a result for an erasure that did everything it was asked to do, and for which personal data of the same data subject was written while it was running.

public static ErasureExecutionResult CompletedExceptConcurrentWrites(int keysDeleted, int recordsAffected, string errorMessage)

Parameters

keysDeleted int

The number of keys destroyed.

recordsAffected int

The number of records the contributors reported acting on.

errorMessage string

What was found, naming the handles that were live again when the erasure finished.

Returns

ErasureExecutionResult

A result whose Success is false.

Remarks

Success is false because the erasure did not cover everything it reported on, and a caller that only asks "did it work" must not read this as a completed erasure. It is nonetheless distinct from PartiallySucceeded(int, int, string): nothing the erasure attempted failed. See CompletedExceptConcurrentWrites for why the distinction is the fix rather than a nicety.

Failed(string)

Creates a result for an erasure that was ATTEMPTED and failed.

public static ErasureExecutionResult Failed(string errorMessage)

Parameters

errorMessage string

What went wrong.

Returns

ErasureExecutionResult

A result whose outcome is Failed.

Remarks

Reserved for a genuine fault. If the erasure was never attempted, use Refused(string): a refusal reported as a failure is retried, and retried to exhaustion becomes terminal.

PartiallySucceeded(int, int, string)

Creates a partially succeeded execution result where some contributors or key deletions failed.

public static ErasureExecutionResult PartiallySucceeded(int keysDeleted, int recordsAffected, string errorMessage)

Parameters

keysDeleted int
recordsAffected int
errorMessage string

Returns

ErasureExecutionResult

Refused(string)

Creates a result for an erasure this executor DECLINED to perform, with nothing destroyed.

public static ErasureExecutionResult Refused(string reason)

Parameters

reason string

Why it was declined, recorded verbatim for the caller and the operator.

Returns

ErasureExecutionResult

A result whose outcome is Refused.

Remarks

Use this wherever the erasure was never attempted — a legal hold deferring it, a request another executor already owns, a status that makes it ineligible, a request that does not exist. Reporting those as failures is what made a lawful Article 17(3) deferral read to a consumer as a failed erasure, and what let a correct withholding consume a retry budget until it became a terminal non-erasure.

Succeeded(int, int)

Creates a successful execution result.

public static ErasureExecutionResult Succeeded(int keysDeleted, int recordsAffected)

Parameters

keysDeleted int
recordsAffected int

Returns

ErasureExecutionResult