Class UpdateCommitterEx<T,U>

All Implemented Interfaces:
LogOutputAppendable, NotificationQueue.Notification, IntrusiveDoublyLinkedNode<NotificationQueue.Notification>, Runnable

public class UpdateCommitterEx<T,U> extends TerminalNotification
Tool for allowing cleanup at update cycle end as a TerminalNotification. The general pattern is to specify target as something that contains the state to be cleaned up, and invoke an instance method on target from committer. By maintaining only weak reachability to target, we avoid prolonging its lifetime in order to perform cleanup tasks that would be obviated by its collection.

This variant additionally allows a secondary weakly-reachable input to be specified on a per-cycle basis, allowing the UpdateCommitterEx to be stored and re-used across cycles when this pattern is necessary.

  • Constructor Details

  • Method Details

    • run

      public void run()
    • maybeActivate

      public void maybeActivate(@NotNull U secondary)