Skip to content

IReminderService Methods

Functionality for managing reminders.

GetReminder(GrainId, string)

abstract
public abstract Task<IGrainReminder> GetReminder(GrainId grainId, string reminderName)
Gets the reminder registered to the specified grain with the provided name.

Parameters

grainIdGrainId
A reference to the grain which the reminder is registered on.
reminderNamestring
The name of the reminder.

Returns

The reminder.

GetReminders(GrainId)

abstract
public abstract Task<List<IGrainReminder>> GetReminders(GrainId grainId)
Gets all reminders registered for the specified grain.

Parameters

grainIdGrainId
A reference to the grain.

Returns

A list of all registered reminders for the specified grain.

RegisterOrUpdateReminder(GrainId, string, TimeSpan, TimeSpan)

abstract
public abstract Task<IGrainReminder> RegisterOrUpdateReminder(GrainId grainId, string reminderName, TimeSpan dueTime, TimeSpan period)
Registers a new reminder or updates an existing one.

Parameters

grainIdGrainId
A reference to the grain which the reminder is being registered or updated on behalf of.
reminderNamestring
The reminder name.
dueTimeTimeSpan
The amount of time to delay before firing the reminder initially.
periodTimeSpan
The time interval between invocations of the reminder.

Returns

The reminder.

Start

abstract
public abstract Task Start()
Starts the service.

Returns

A System.Threading.Tasks.Task representing the operation.

Stop

abstract
public abstract Task Stop()
Stops the service.

Returns

A System.Threading.Tasks.Task representing the operation.

UnregisterReminder(IGrainReminder)

abstract
public abstract Task UnregisterReminder(IGrainReminder reminder)
Unregisters the specified reminder.

Parameters

reminderIGrainReminder
The reminder.

Returns

A System.Threading.Tasks.Task representing the operation.