remember method

List<String> remember(
  1. String observationId
)

Returns ids that fell out of the window (to drop from the registry).

Implementation

List<String> remember(String observationId) {
  _ids.remove(observationId);
  _ids.addLast(observationId);
  final dropped = <String>[];
  while (_ids.length > capacity) {
    dropped.add(_ids.removeFirst());
  }
  return dropped;
}