upsertAll method
Persists or updates the provided revoke entries.
Implementations MUST only update existing records when the entry version is greater than the stored value to maintain monotonic ordering.
Implementation
@override
Future<List<RevokeEntry>> upsertAll(List<RevokeEntry> entries) async {
final applied = <RevokeEntry>[];
for (final entry in entries) {
final namespaceRecords = _entries.putIfAbsent(
entry.namespace,
() => <String, RevokeEntry>{},
);
final current = namespaceRecords[entry.taskId];
if (current == null || entry.version > current.version) {
namespaceRecords[entry.taskId] = entry;
applied.add(entry);
} else {
applied.add(current);
}
}
return applied;
}