Interface DeleteListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DeleteListener
Listener interface for notifications that an object is about to be deleted.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onDelete(Transaction tx, ObjId id, int[] path, NavigableSet<ObjId> referrers)
    Receive notification of an object about to be deleted.
  • Method Details

    • onDelete

      void onDelete(Transaction tx, ObjId id, int[] path, NavigableSet<ObjId> referrers)
      Receive notification of an object about to be deleted.

      Notifications are delivered in the same thread that is deleting the object, before the delete actually occurs. At most one notification will be delivered for any object, even if Transaction.delete() is invoked reentrantly from within this listener.

      Parameters:
      tx - associated transaction
      id - the ID of the object about to be deleted
      path - path of reference fields (represented by storage IDs) that lead to id
      referrers - all objects that (indirectly) refer to the affected object via the path