Interface IEventStoreAdmin
- Namespace
- Opossum
- Assembly
- Opossum.dll
Destructive administrative operations for the event store. Unlike IEventStoreMaintenance, these operations permanently remove data and transparently bypass write-protection on files.
public interface IEventStoreAdmin
Methods
DeleteStoreAsync(CancellationToken)
Permanently and irreversibly deletes all data owned by this store: events, indices, projections, checkpoints, and the ledger. Write-protected files (see WriteProtectEventFiles and WriteProtectProjectionFiles) are handled transparently — their read-only attribute is removed before deletion.
After this call the store directory no longer exists on disk. Subsequent AppendAsync(NewEvent[], AppendCondition?, CancellationToken) or ReadAsync(Query, ReadOption[]?, long?, int?) calls will recreate the required directory structure automatically.
Legitimate use cases:
- Development and test environment cleanup
- Wiping a store to start fresh after a schema change
- GDPR / data-erasure compliance at the store level
WARNING: This operation is irreversible. All event history is lost permanently.
Task DeleteStoreAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenToken that can cancel the operation.