Interface Cleaner<T>


public interface Cleaner<T>
The Cleaner represents an object that is used to clean up after the keyed resource. Typically this is used when a Lease referring a resource has expired meaning that any memory, file descriptors, or other such limited data should be released for the keyed resource. The resource keys used should be distinct over time to avoid conflicts.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clean(T key)
    This method is used to clean up after a the keyed resource.
  • Method Details

    • clean

      void clean(T key) throws Exception
      This method is used to clean up after a the keyed resource. To ensure that the leasing infrastructure operates properly this should not block releasing resources. If required this should spawn a thread to perform time consuming tasks.
      Parameters:
      key - this is the key for the resource to clean
      Throws:
      Exception