cancel

fun cancel()

Immediately cancels all ongoing collection jobs and releases all internal resources.

This method is idempotent and can be called multiple times. After calling, the DataCollector instance should be considered inactive and should not be used again.