GrainService
class
Namespace: Orleans.Runtime
Base class for implementing a grain-like partitioned service with per silo instances of it automatically instantiated and started by silo runtime
public abstract class GrainService : SystemTarget, ISystemTarget, IRingRangeListener, IAddressable, IGrainServiceConstructors
GrainServiceOnly to make Reflection happy. Do not use it in your implementationGrainService(GrainId, Silo, ILoggerFactory)Constructor to use for grain services
Properties
RangeSerialNumberGets the monotonically increasing serial number of the version of the ring range owned by the grain service instanceRingRangeGets the range of the partitioning ring currently owned by the grain service instanceStatusGets the status of the grain service instanceStoppedCancellationTokenSourceGets the token for signaling cancellation upon stopping of grain service
Methods
Init(IServiceProvider)Invoked upon initialization of the serviceOnRangeChange(IRingRange, IRingRange, bool)Invoked when the ring range owned by the service instance changes because of a change in the cluster stateStartInvoked when service is being startedStartInBackgroundDeferred part of initialization that executes after the service is already started (to speed up startup). Sets Status to Started.StopInvoked when service is being stopped
