Ejemplo n.º 1
0
 public override Task OnDeactivateAsync()
 {
     Console.WriteLine("Deactivate: " + Utils.GetReadableName(self));
     processor        = null;
     producer         = null;
     orderingEnforcer = null;
     sendStrategies   = null;
     actionQueue      = null;
     GC.Collect();
     return(Task.CompletedTask);
 }
Ejemplo n.º 2
0
        public virtual async Task <SiloAddress> Init(IPrincipalGrain principalGrain, ITupleProcessor processor)
        {
            this.self = this.GrainReference.Cast <IWorkerGrain>();
            Console.WriteLine("Init Start: " + Utils.GetReadableName(self));
            string ext;

            this.GetPrimaryKey(out ext);
            this.orderingEnforcer = new OrderingGrainWithSequenceNumber(ext);
            this.principalGrain   = principalGrain;
            this.processor        = processor;
            await this.processor.Initialize();

            Console.WriteLine("Init Finished: " + Utils.GetReadableName(self));
            return(localSiloDetails.SiloAddress);
        }