Skip to content

StorageFaultGrain

class

Namespace: Orleans.TestingHost

Grain that tracks storage exceptions to be injected.
public class StorageFaultGrain : Grain, IGrain, IGrainWithStringKey, IAddressable, IStorageFaultGrain

Constructors

Methods

  • AddFaultOnClear(GrainId, 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
  • AddFaultOnWrite(GrainId, Exception) Adds a storage exception to be thrown when the referenced grain writes state to a storage provider
  • 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.
  • OnClear(GrainId) Throws a storage exception if one has been added for the grain reference for clearing state.
  • OnRead(GrainId) 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.