コード例 #1
0
ファイル: AzureSilo.cs プロジェクト: vobradovich/orleans
        internal AzureSilo(IServiceRuntimeWrapper serviceRuntimeWrapper)
        {
            this.serviceRuntimeWrapper = serviceRuntimeWrapper;
            DataConnectionConfigurationSettingName = AzureConstants.DataConnectionConfigurationSettingName;
            SiloEndpointConfigurationKeyName = AzureConstants.SiloEndpointConfigurationKeyName;
            ProxyEndpointConfigurationKeyName = AzureConstants.ProxyEndpointConfigurationKeyName;

            StartupRetryPause = AzureConstants.STARTUP_TIME_PAUSE; // 5 seconds
            MaxRetries = AzureConstants.MAX_RETRIES;  // 120 x 5s = Total: 10 minutes

            logger = LogManager.GetLogger("OrleansAzureSilo", LoggerType.Runtime);
        }
コード例 #2
0
        internal AzureSilo(IServiceRuntimeWrapper serviceRuntimeWrapper)
        {
            this.serviceRuntimeWrapper             = serviceRuntimeWrapper;
            DataConnectionConfigurationSettingName = AzureConstants.DataConnectionConfigurationSettingName;
            SiloEndpointConfigurationKeyName       = AzureConstants.SiloEndpointConfigurationKeyName;
            ProxyEndpointConfigurationKeyName      = AzureConstants.ProxyEndpointConfigurationKeyName;

            StartupRetryPause = AzureConstants.STARTUP_TIME_PAUSE; // 5 seconds
            MaxRetries        = AzureConstants.MAX_RETRIES;        // 120 x 5s = Total: 10 minutes

            logger = LogManager.GetLogger("OrleansAzureSilo", LoggerType.Runtime);
        }
コード例 #3
0
        internal AzureSilo(IServiceRuntimeWrapper serviceRuntimeWrapper, ILoggerFactory loggerFactory)
        {
            this.serviceRuntimeWrapper             = serviceRuntimeWrapper;
            DataConnectionConfigurationSettingName = AzureConstants.DataConnectionConfigurationSettingName;
            SiloEndpointConfigurationKeyName       = AzureConstants.SiloEndpointConfigurationKeyName;
            ProxyEndpointConfigurationKeyName      = AzureConstants.ProxyEndpointConfigurationKeyName;

            StartupRetryPause = AzureConstants.STARTUP_TIME_PAUSE; // 5 seconds
            MaxRetries        = AzureConstants.MAX_RETRIES;        // 120 x 5s = Total: 10 minutes

            this.loggerFactory = loggerFactory;
            logger             = loggerFactory.CreateLogger <AzureSilo>();
        }
コード例 #4
0
        internal static ClusterConfiguration DefaultConfiguration(IServiceRuntimeWrapper serviceRuntimeWrapper)
        {
            var config = new ClusterConfiguration();

            config.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.AzureTable;
            config.Globals.ClusterId    = serviceRuntimeWrapper.DeploymentId;
            try
            {
                config.Globals.DataConnectionString = serviceRuntimeWrapper.GetConfigurationSettingValue(AzureConstants.DataConnectionConfigurationSettingName);
            }
            catch (Exception exc)
            {
                if (exc.GetType().Name.Contains("RoleEnvironmentException"))
                {
                    config.Globals.DataConnectionString = null;
                }
                else
                {
                    throw;
                }
            }

            return(config);
        }
コード例 #5
0
ファイル: AzureSilo.cs プロジェクト: vobradovich/orleans
        internal static ClusterConfiguration DefaultConfiguration(IServiceRuntimeWrapper serviceRuntimeWrapper)
        {
            var config = new ClusterConfiguration();

            config.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.AzureTable;
            config.Globals.DeploymentId = serviceRuntimeWrapper.DeploymentId;
            try
            {
                config.Globals.DataConnectionString = serviceRuntimeWrapper.GetConfigurationSettingValue(AzureConstants.DataConnectionConfigurationSettingName);
            }
            catch (Exception exc)
            {
                if (exc.GetType().Name.Contains("RoleEnvironmentException"))
                {
                    config.Globals.DataConnectionString = null;
                }
                else
                {
                    throw;
                }
            }
            
            return config;
        }