Ejemplo n.º 1
0
        private IReminderService GetReminderService(
            string operation,
            string reminderName,
            out GrainReference grainRef)
        {
            CheckValidReminderServiceType(operation);
            grainRef = CurrentActivationData.GrainReference;
            SiloAddress destination = MapGrainReferenceToSiloRing(grainRef);

            if (logger.IsVerbose)
            {
                logger.Verbose("{0} for reminder {1}, grainRef: {2} responsible silo: {3}/x{4, 8:X8} based on {5}",
                               operation,
                               reminderName,
                               grainRef.ToDetailedString(),
                               destination,
                               destination.GetConsistentHashCode(),
                               ConsistentRingProvider.ToString());
            }
            return(InternalGrainFactory.GetSystemTarget <IReminderService>(Constants.ReminderServiceId, destination));
        }
Ejemplo n.º 2
0
 private static string CreateMessage(GrainReference grainReference)
 {
     return($"Attempted to use a GrainReference which has not been bound to the runtime: {grainReference.ToDetailedString()}." +
            $" Use the {nameof(IGrainFactory)}.{nameof(IGrainFactory.BindGrainReference)} method to bind this reference to the runtime.");
 }