Class SyncRegistration

    • Constructor Detail

      • SyncRegistration

        public SyncRegistration​(Runnable cancelAction)
        Construct a SyncRegistration, using the given cancelAction when cancel() is invoked.
        Parameters:
        cancelAction - the operation to perform when cancel() is invoked
    • Method Detail

      • cancel

        public CompletableFuture<Void> cancel()
        Description copied from interface: Registration
        Cancel the registration from which this instance was returned. Does nothing if the registration has already been canceled, or when the registration was undone by another mechanism (such as a new registration overriding this one).
        Specified by:
        cancel in interface Registration
        Returns:
        a CompletableFuture of Void to react when this Registration has been canceled