pip_services3_commons.run.Cleaner module

pip_services3_commons.run.Cleaner

Cleaner component implementation

copyright

Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.

license

MIT, see LICENSE for more details.

class pip_services3_commons.run.Cleaner.Cleaner

Bases: object

Helper class that cleans stored object state.

static clear(correlation_id: Optional[str, None], components: List[Any])

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.

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • components – the list of components that are to be cleaned.

static clear_one(correlation_id: Optional[str, None], component: Any)

Clears state of specific component.

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

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • component – the component that is to be cleaned.