Class Cleaner

java.lang.Object
org.pipservices3.commons.run.Cleaner

public class Cleaner extends Object
Helper class that cleans stored object state.
See Also:
  • Constructor Details

    • Cleaner

      public Cleaner()
  • Method Details

    • clearOne

      public static void clearOne(String correlationId, Object component) throws ApplicationException
      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:
      correlationId - (optional) transaction id to trace execution through call chain.
      component - the component that is to be cleaned.
      Throws:
      ApplicationException - when errors occured.
      See Also:
    • clear

      public static void clear(String correlationId, Iterable<Object> components) throws ApplicationException
      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:
      correlationId - (optional) transaction id to trace execution through call chain.
      components - the list of components that are to be cleaned.
      Throws:
      ApplicationException - when errors occured.
      See Also: