ICleanable

Interface that allows you to create components with a method to clean their states.

Description

The ICleanable interface allows you to create components with a method to clean their states.

Instance methods

clear

Clears component state.

clear(correlation_id: Optional[str])

  • correlation_id: Optional[str] - (optional) transaction id to trace execution through call chain.

Examples

class MyObjectWithState(ICleanable):
    _state = {}
    ...

    def clear(self, correlation_id):
        self._state = {}  

See also