Skip to content

IReminderService Methods

Functionality for managing reminders.

GetReminder(GrainId, string)

abstract
View source
[Orleans.Alias(GetReminder)]
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.

GetReminder(GrainId, string, CancellationToken)

virtual
View source
[Orleans.Alias(AC622EEB)]
public virtual Task<IGrainReminder?> GetReminder(GrainId grainId, string reminderName, CancellationToken cancellationToken)
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.
cancellationTokenCancellationToken
The cancellation token.

Returns

The reminder.

GetReminders(GrainId)

abstract
View source
[Orleans.Alias(GetReminders)]
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.

GetReminders(GrainId, CancellationToken)

virtual
View source
[Orleans.Alias(419EB51E)]
public virtual Task<List<IGrainReminder>> GetReminders(GrainId grainId, CancellationToken cancellationToken)
Gets all reminders registered for the specified grain.

Parameters

grainIdGrainId
A reference to the grain.
cancellationTokenCancellationToken
The cancellation token.

Returns

A list of all registered reminders for the specified grain.

RegisterOrUpdateReminder(GrainId, string, TimeSpan, TimeSpan)

abstract
View source
[Orleans.Alias(RegisterOrUpdateReminder)]
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.

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

virtual
View source
[Orleans.Alias(1281C86D)]
public virtual Task<IGrainReminder> RegisterOrUpdateReminder(GrainId grainId, string reminderName, TimeSpan dueTime, TimeSpan period, CancellationToken cancellationToken)
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.
cancellationTokenCancellationToken
The cancellation token.

Returns

The reminder.

Start

abstract
View source
[Orleans.Alias(Start)]
public abstract Task Start()
Starts the service.

Returns

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

Start(CancellationToken)

virtual
View source
[Orleans.Alias(5CF78F8A)]
public virtual Task Start(CancellationToken cancellationToken)
Starts the service.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

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

Stop

abstract
View source
[Orleans.Alias(Stop)]
public abstract Task Stop()
Stops the service.

Returns

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

Stop(CancellationToken)

virtual
View source
[Orleans.Alias(DCFCA00D)]
public virtual Task Stop(CancellationToken cancellationToken)
Stops the service.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

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

UnregisterReminder(IGrainReminder)

abstract
View source
[Orleans.Alias(UnregisterReminder)]
public abstract Task UnregisterReminder(IGrainReminder reminder)
Unregisters the specified reminder.

Parameters

reminderIGrainReminder
The reminder.

Returns

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

UnregisterReminder(IGrainReminder, CancellationToken)

virtual
View source
[Orleans.Alias(A7AF84A8)]
public virtual Task UnregisterReminder(IGrainReminder reminder, CancellationToken cancellationToken)
Unregisters the specified reminder.

Parameters

reminderIGrainReminder
The reminder.
cancellationTokenCancellationToken
The cancellation token.

Returns

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