CancellationToken.registerCancellationCallback Method

定义

重载

registerCancellationCallback(Runnable callback)

Registers a callback which will be executed when this system.fabric.CancellationToken object is cancelled.

registerCancellationCallback(String name, Runnable callback)

Registers a callback which will be executed when this system.fabric.CancellationToken object is cancelled.

registerCancellationCallback(Runnable callback)

Registers a callback which will be executed when this system.fabric.CancellationToken object is cancelled.

public void registerCancellationCallback(Runnable callback)

参数

callback
Runnable

java.lang.Runnable to be executed when on token cancel event.

registerCancellationCallback(String name, Runnable callback)

Registers a callback which will be executed when this system.fabric.CancellationToken object is cancelled.

public void registerCancellationCallback(String name, Runnable callback)

参数

name
String

callback name.

callback
Runnable

java.lang.Runnable to be executed when on token cancel event.

适用于