Ejemplo n.º 1
0
        public bool TryResolvePlacementStrategy(GrainType grainType, GrainProperties properties, out PlacementStrategy result)
        {
            if (grainType.IsClient())
            {
                result = _strategy;
                return(true);
            }

            result = default;
            return(false);
        }
Ejemplo n.º 2
0
        public IGrainLocator GetGrainLocatorInternal(GrainType grainType)
        {
            IGrainLocator result;

            if (grainType.IsClient())
            {
                result = this.clientGrainLocator;
            }
            else if (this.grainDirectoryResolver.HasNonDefaultDirectory(grainType))
            {
                result = this.cachedGrainLocator;
            }
            else
            {
                result = this.dhtGrainLocator;
            }

            return(result);
        }