public class Timer extends Object
| Constructor and Description |
|---|
Timer(NativeCallableUnit fn,
Context ctx,
long delay,
long interval,
FunctionRefCPEntry onTriggerFunction,
FunctionRefCPEntry onErrorFunction)
Triggers the timer.
|
public Timer(NativeCallableUnit fn, Context ctx, long delay, long interval, FunctionRefCPEntry onTriggerFunction, FunctionRefCPEntry onErrorFunction) throws SchedulingException
fn - Trigger functionctx - The ballerina context.delay - The initial delay.interval - The interval between two task executions.onTriggerFunction - The main function which will be triggered by the task.onErrorFunction - The function which will be triggered in the error situation.SchedulingException - if cannot create the schedulerpublic String getId()
public void stop()
Copyright © 2018 WSO2. All rights reserved.