Interface ObjTypeRetainedIdentifier


public interface ObjTypeRetainedIdentifier
Implementations of this interface are called for objects that have been identified to be retained either by a PerRealmRetainedIdentifier or another ObjTypeRetainedIdentifier.

Polaris extensions and plugins that persist non-standard references or objects must provide an implementation of this interface to ensure that the required references and objects are not purged.

Implementation must be annotated as @ApplicationScoped for CDI usage.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.polaris.persistence.nosql.api.obj.ObjType
    The object type that the implementation handles.
    void
    identifyRelatedObj(RetainedCollector collector, org.apache.polaris.persistence.nosql.api.obj.ObjRef objRef)
    Called for every scanned object with the ID objRef having the object type yielded by handledObjType().
    Human-readable name.
  • Method Details

    • name

      String name()
      Human-readable name.
    • handledObjType

      @Nonnull org.apache.polaris.persistence.nosql.api.obj.ObjType handledObjType()
      The object type that the implementation handles.
    • identifyRelatedObj

      void identifyRelatedObj(@Nonnull RetainedCollector collector, @Nonnull org.apache.polaris.persistence.nosql.api.obj.ObjRef objRef)
      Called for every scanned object with the ID objRef having the object type yielded by handledObjType().

      Any exception thrown from this function aborts the whole maintenance run. Exceptions thrown from functionality called by the implementation must be properly handled.

      Parameters:
      collector - instance that collects the objects and references to retain
      objRef - ID of the object that has been scanned