Skip to content

IInbox Methods

Registers handlers for the messages delivered to a grain's inbox.

Register(IInboxHandler)

abstract
public abstract IInbox Register(IInboxHandler handler)
Registers a handler.

Parameters

handlerIInboxHandler
The handler.

Returns

This inbox.

Register(IInboxMessageSink)

abstract
public abstract IInbox Register(IInboxMessageSink sink)
Registers a sink which accepts messages directly into application-owned journaled state.

Parameters

sinkIInboxMessageSink
The sink.

Returns

This inbox.

RegisterWakeup(Func<TimeSpan?>)

abstract
public abstract IInbox RegisterWakeup(Func<TimeSpan?> getWakeupDelay)
Registers a callback which reports durable work held outside the inbox, such as messages which an IInboxMessageSink accepted, so the messaging wake-up reactivates the grain while that work remains.

Parameters

getWakeupDelayFunc<TimeSpan?>
Returns null when no work is pending; otherwise, the longest acceptable delay before a deactivated grain is reactivated to resume the work. A delay of System.TimeSpan.Zero or less requests a prompt wake-up.

Returns

This inbox.