StorageFaultGrain Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Grain that tracks storage exceptions to be injected.
public class StorageFaultGrain : Orleans.Grain, Orleans.IGrainWithStringKey, Orleans.TestingHost.IStorageFaultGrain
type StorageFaultGrain = class
inherit Grain
interface IStorageFaultGrain
interface IGrainWithStringKey
interface IGrain
interface IAddressable
Public Class StorageFaultGrain
Inherits Grain
Implements IGrainWithStringKey, IStorageFaultGrain
- Inheritance
- Implements
Constructors
StorageFaultGrain() |
Properties
GrainContext | (Inherited from Grain) |
GrainFactory |
Gets an object which can be used to access other grains. Null if this grain is not associated with a Runtime, such as when created directly for unit testing. (Inherited from Grain) |
GrainReference | (Inherited from Grain) |
IdentityString |
String representation of grain's SiloIdentity including type and primary key. (Inherited from Grain) |
RuntimeIdentity |
A unique identifier for the current silo. There is no semantic content to this string, but it may be useful for logging. (Inherited from Grain) |
ServiceProvider |
Gets the IServiceProvider managed by the runtime. Null if this grain is not associated with a Runtime, such as when created directly for unit testing. (Inherited from Grain) |
Methods
AddFaultOnClear(GrainId, Exception) |
Adds a storage exception to be thrown when the referenced grain clears state in a storage provider |
AddFaultOnClear(GrainReference, Exception) |
Adds a storage exception to be thrown when the referenced grain clears state in a storage provider |
AddFaultOnRead(GrainId, Exception) |
Adds a storage exception to be thrown when the referenced grain reads state from a storage provider |
AddFaultOnRead(GrainReference, Exception) |
Adds a storage exception to be thrown when the referenced grain reads state from a storage provider |
AddFaultOnWrite(GrainId, Exception) |
Adds a storage exception to be thrown when the referenced grain writes state to a storage provider |
AddFaultOnWrite(GrainReference, Exception) |
Adds a storage exception to be thrown when the referenced grain writes state to a storage provider |
DeactivateOnIdle() |
Deactivate this activation of the grain after the current grain method call is completed. This call will mark this activation of the current grain to be deactivated and removed at the end of the current method. The next call to this grain will result in a different activation to be used, which typical means a new activation will be created automatically by the runtime. (Inherited from Grain) |
DelayDeactivation(TimeSpan) |
Delay Deactivation of this activation at least for the specified time duration.
A positive |
GetLogger() |
Returns a logger object that this grain's code can use for tracing. The name of the logger will be derived from the grain class name. (Inherited from Grain) |
GetLogger(String) |
Returns a logger object that this grain's code can use for tracing. (Inherited from Grain) |
GetReminder(String) |
Returns a previously registered reminder. (Inherited from Grain) |
GetReminders() |
Returns a list of all reminders registered by the grain. (Inherited from Grain) |
GetStreamProvider(String) | (Inherited from Grain) |
GetStreamProviders() | (Inherited from Grain) |
MigrateOnIdle() |
Starts an attempt to migrating this instance to another location. Migration captures the current RequestContext, making it available to the activation's placement director so that it can consider it when selecting a new location. Migration will occur asynchronously, when no requests are executing, and will not occur if the activation's placement director does not select an alternative location. (Inherited from Grain) |
OnActivateAsync() |
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated. |
OnActivateAsync() |
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated. (Inherited from Grain) |
OnActivateAsync(CancellationToken) |
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated. |
OnActivateAsync(CancellationToken) |
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated. (Inherited from Grain) |
OnClear(GrainId) |
Throws a storage exception if one has been added for the grain reference for clearing state. |
OnClear(GrainReference) |
Throws a storage exception if one has been added for the grain reference for clearing state. |
OnDeactivateAsync() |
This method is called at the begining of the process of deactivating a grain. (Inherited from Grain) |
OnDeactivateAsync(DeactivationReason, CancellationToken) |
This method is called at the beginning of the process of deactivating a grain. (Inherited from Grain) |
OnRead(GrainId) |
Throws a storage exception if one has been added for the grain reference for reading. |
OnRead(GrainReference) |
Throws a storage exception if one has been added for the grain reference for reading. |
OnWrite(GrainId) |
Throws a storage exception if one has been added for the grain reference for writing. |
OnWrite(GrainReference) |
Throws a storage exception if one has been added for the grain reference for writing. |
Participate(IGrainLifecycle) | (Inherited from Grain) |
RegisterOrUpdateReminder(String, TimeSpan, TimeSpan) |
Registers a persistent, reliable reminder to send regular notifications (reminders) to the grain.
The grain must implement the |
RegisterTimer(Func<Object,Task>, Object, TimeSpan, TimeSpan) |
Obsolete.
Registers a timer to send periodic callbacks to this grain. (Inherited from Grain) |
UnregisterReminder(IGrainReminder) |
Unregisters a previously registered reminder. (Inherited from Grain) |
Explicit Interface Implementations
IGrainBase.GrainContext | (Inherited from Grain) |
Extension Methods
DeactivateOnIdle(IGrainBase) |
Deactivate this grain activation after the current grain method call is completed. This call will mark this activation of the current grain to be deactivated and removed at the end of the current method. The next call to this grain will result in a different activation to be used, which typical means a new activation will be created automatically by the runtime. |
MigrateOnIdle(IGrainBase) |
Starts an attempt to migrating this instance to another location. Migration captures the current RequestContext, making it available to the activation's placement director so that it can consider it when selecting a new location. Migration will occur asynchronously, when no requests are executing, and will not occur if the activation's placement director does not select an alternative location. |
RegisterGrainTimer(IGrainBase, Func<CancellationToken,Task>, GrainTimerCreationOptions) |
Creates a grain timer. |
RegisterGrainTimer(IGrainBase, Func<CancellationToken,Task>, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer(IGrainBase, Func<Task>, GrainTimerCreationOptions) | |
RegisterGrainTimer(IGrainBase, Func<Task>, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,CancellationToken,Task>, TState, GrainTimerCreationOptions) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,CancellationToken,Task>, TState, TimeSpan, TimeSpan) |
Creates a grain timer. |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,Task>, TState, GrainTimerCreationOptions) | |
RegisterGrainTimer<TState>(IGrainBase, Func<TState,Task>, TState, TimeSpan, TimeSpan) |
Creates a grain timer. |
AsReference(IAddressable, Type) |
Returns a typed reference to the provided grain. |
AsReference<TGrainInterface>(IAddressable) |
Returns a typed reference to the provided grain. |
BindGrainReference(IAddressable, IGrainFactory) |
Binds the grain reference to the provided IGrainFactory. |
Cast(IAddressable, Type) |
Returns a typed reference to the provided grain. |
Cast<TGrainInterface>(IAddressable) |
Returns a typed reference to the provided grain. |
GetGrainId(IAddressable) |
Returns the grain id corresponding to the provided grain. |
GetGrainIdentity(IGrain) | |
GetPrimaryKey(IGrain) | |
GetPrimaryKey(IGrain, String) | |
GetPrimaryKey(IAddressable) |
Returns the Guid representation of a grain primary key. |
GetPrimaryKey(IAddressable, String) |
Returns the Guid representation of a grain primary key. |
GetPrimaryKeyLong(IGrain) | |
GetPrimaryKeyLong(IGrain, String) | |
GetPrimaryKeyLong(IAddressable) |
Returns the |
GetPrimaryKeyLong(IAddressable, String) |
Returns the |
GetPrimaryKeyString(IGrainWithStringKey) | |
GetPrimaryKeyString(IAddressable) |
Returns the |
IsPrimaryKeyBasedOnLong(IAddressable) |
Returns whether part of the primary key is of type |
GetReminder(Grain, String) |
Returns a previously registered reminder. |
GetReminder(IGrainBase, String) |
Returns a previously registered reminder. |
GetReminders(Grain) |
Returns a list of all reminders registered by the grain. |
GetReminders(IGrainBase) |
Returns a list of all reminders registered by the grain. |
RegisterOrUpdateReminder(Grain, String, TimeSpan, TimeSpan) |
Registers a persistent, reliable reminder to send regular notifications (reminders) to the grain.
The grain must implement the |
RegisterOrUpdateReminder(IGrainBase, String, TimeSpan, TimeSpan) |
Registers a persistent, reliable reminder to send regular notifications (reminders) to the grain.
The grain must implement the |
UnregisterReminder(Grain, IGrainReminder) |
Unregisters a previously registered reminder. |
UnregisterReminder(IGrainBase, IGrainReminder) |
Unregisters a previously registered reminder. |
GetStreamProvider(Grain, String) |
Gets the stream provider with the specified |
GetStreamProvider(IGrainBase, String) |
Gets the stream provider with the specified |
GetLogger(Grain) |
Returns a logger object that this grain's code can use for tracing. The name of the logger will be derived from the grain class name. |
GetLogger(Grain, String) |
Returns a logger object that this grain's code can use for tracing. |
GetGrainStorage(Grain, IServiceProvider) |
Acquire the storage provider associated with the grain type. |