clear static method

Future clear(
  1. String? correlationId,
  2. List? components
)

Clears state of multiple components.

To be cleaned state components must implement ICleanable interface. If they don't the call to this method has no effect.

  • correlationId (optional) transaction id to trace execution through call chain.
  • components the list of components that are to be cleaned. Retrun Future that returns error or null no errors occured.

See clearOne See ICleanable

Implementation

static Future clear(String? correlationId, List? components) async {
  if (components == null) return;

  for (var component in components) {
    await Cleaner.clearOne(correlationId, component);
  }
}