StorageFaultGrain
class
Namespace: Orleans.TestingHost
Grain that tracks storage exceptions to be injected.
public class StorageFaultGrain : Grain, IGrain, IGrainWithStringKey, IAddressable, IStorageFaultGrainConstructors
Methods
AddFaultOnClear(GrainId, Exception)Adds a storage exception to be thrown when the referenced grain clears state in a storage providerAddFaultOnRead(GrainId, Exception)Adds a storage exception to be thrown when the referenced grain reads state from a storage providerAddFaultOnWrite(GrainId, Exception)Adds a storage exception to be thrown when the referenced grain writes state to a storage providerOnActivateAsync(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.
