Esempio n. 1
0
 /// accept and notify only Active producers.
 private static bool IsActiveProducer(IStreamProducerExtension producer)
 {
     var grainRef = producer.AsReference();
     if (grainRef.GrainId.IsSystemTarget && grainRef.IsInitializedSystemTarget)
         return RuntimeClient.Current.GetSiloStatus(grainRef.SystemTargetSilo).Equals(SiloStatus.Active);
     
     return true;
 }
Esempio n. 2
0
        private static bool IsDeadProducer(IStreamProducerExtension producer)
        {
            var grainRef = producer.AsReference();

            if (grainRef.GrainId.IsSystemTarget && grainRef.IsInitializedSystemTarget)
            {
                return(RuntimeClient.Current.GetSiloStatus(grainRef.SystemTargetSilo).Equals(SiloStatus.Dead));
            }

            return(false);
        }