Skip to content

IReminderRegistry Methods

Functionality for managing reminders.

GetReminder(GrainId, string)

abstract
View source
public abstract Task<IGrainReminder?> GetReminder(GrainId callingGrainId, string reminderName)
Gets the reminder with the specified name which is registered to the currently active grain.

Parameters

callingGrainIdGrainId
The ID of the the currently executing grain
reminderNamestring
The reminder name.

Returns

The reminder.

GetReminder(GrainId, string, CancellationToken)

virtual
View source
public virtual Task<IGrainReminder?> GetReminder(GrainId callingGrainId, string reminderName, CancellationToken cancellationToken)
Gets a reminder registered to the specified grain.

Parameters

callingGrainIdGrainId
The ID of the currently executing grain.
reminderNamestring
The reminder name.
cancellationTokenCancellationToken
The cancellation token.

Returns

The reminder, or null if it was not found.

GetReminders(GrainId)

abstract
View source
public abstract Task<List<IGrainReminder>> GetReminders(GrainId callingGrainId)
Gets all reminders which are currently registered to the active grain.

Parameters

callingGrainIdGrainId
The ID of the the currently executing grain

Returns

All reminders which are currently registered to the active grain.

GetReminders(GrainId, CancellationToken)

virtual
View source
public virtual Task<List<IGrainReminder>> GetReminders(GrainId callingGrainId, CancellationToken cancellationToken)
Gets all reminders registered to the specified grain.

Parameters

callingGrainIdGrainId
The ID of the currently executing grain.
cancellationTokenCancellationToken
The cancellation token.

Returns

All reminders registered to the specified grain.

RegisterOrUpdateReminder(GrainId, string, TimeSpan, TimeSpan)

abstract
View source
public abstract Task<IGrainReminder> RegisterOrUpdateReminder(GrainId callingGrainId, string reminderName, TimeSpan dueTime, TimeSpan period)
Register or update the reminder with the specified name for the currently active grain.

Parameters

callingGrainIdGrainId
The ID of the the currently executing grain
reminderNamestring
The reminder name.
dueTimeTimeSpan
The amount of time to delay before initially invoking the reminder. A value of System.TimeSpan.Zero means the first tick is scheduled immediately; negative, infinite, or values which exceed the remaining System.DateTime range are rejected.
periodTimeSpan
The time interval between invocations of the reminder. The value must be at least ReminderOptions; smaller values and System.Threading.Timeout.InfiniteTimeSpan are rejected.

Returns

The reminder.

RegisterOrUpdateReminder(GrainId, string, TimeSpan, TimeSpan, CancellationToken)

virtual
View source
public virtual Task<IGrainReminder> RegisterOrUpdateReminder(GrainId callingGrainId, string reminderName, TimeSpan dueTime, TimeSpan period, CancellationToken cancellationToken)
Registers or updates a reminder for the specified grain.

Parameters

callingGrainIdGrainId
The ID of the currently executing grain.
reminderNamestring
The reminder name.
dueTimeTimeSpan
The amount of time to delay before initially invoking the reminder.
periodTimeSpan
The time interval between invocations of the reminder.
cancellationTokenCancellationToken
The cancellation token.

Returns

The reminder.

UnregisterReminder(GrainId, IGrainReminder)

abstract
View source
public abstract Task UnregisterReminder(GrainId callingGrainId, IGrainReminder reminder)
Unregisters a reminder from the currently active grain.

Parameters

callingGrainIdGrainId
The ID of the the currently executing grain
reminderIGrainReminder
The reminder to unregister.

Returns

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

UnregisterReminder(GrainId, IGrainReminder, CancellationToken)

virtual
View source
public virtual Task UnregisterReminder(GrainId callingGrainId, IGrainReminder reminder, CancellationToken cancellationToken)
Unregisters a reminder from the specified grain.

Parameters

callingGrainIdGrainId
The ID of the currently executing grain.
reminderIGrainReminder
The reminder to unregister.
cancellationTokenCancellationToken
The cancellation token.

Returns

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