Package org.pipservices3.commons.run
Interface ICleanable
public interface ICleanable
Interface for components that should clean their state.
Cleaning state most often is used during testing. But there may be situations when it can be done in production.
### Example ###
class MyObjectWithState implements ICleanable {
Object[] _state = new Object[]{};
...
public void clear(String correlationId) {
this._state = new Object[]{};
}
}
- See Also:
-
Method Summary
-
Method Details
-
clear
Clears component state.- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.- Throws:
ApplicationException
- when error or null no errors occured.
-