select method

TaggedReplayModelEntry<DataType>? select(
  1. int tag
)

Accepts and removes an eligible replay, or returns null.

Implementation

TaggedReplayModelEntry<DataType>? select(int tag) {
  _validateTag(tag);
  if (!_eligibleTags.remove(tag)) {
    return null;
  }
  final entry =
      TaggedReplayModelEntry<DataType>(_payloads[tag]!, _reasons[tag]!);
  _occupiedTags.remove(tag);
  _backoffRemaining[tag] = 0;
  return entry;
}