Exemple #1
0
        /// <param name="config"> </param>
        /// <param name="dependencies"> </param>
        /// <param name="policyNameSetting">
        /// @return </param>
        private SslPolicy GetSslPolicy(Config config, Dependencies dependencies, Setting <string> policyNameSetting)
        {
            SslPolicyLoader sslPolicyLoader = ( SslPolicyLoader )dependencies.ResolveDependency(typeof(SslPolicyLoader));
            string          policyName      = ( string )config.Get(policyNameSetting);

            return(sslPolicyLoader.GetPolicy(policyName));
        }
Exemple #2
0
        /// <param name="discoveryServiceFactory"> </param>
        /// <param name="dependencies"> </param>
        /// <param name="config"> </param>
        /// <param name="logProvider"> </param>
        protected internal virtual void ConfigureDiscoveryService(DiscoveryServiceFactory discoveryServiceFactory, Dependencies dependencies, Config config, LogProvider logProvider)
        {
            SslPolicyLoader sslPolicyFactory = ( SslPolicyLoader )dependencies.SatisfyDependency(SslPolicyLoader.create(config, logProvider));
            SslPolicy       clusterSslPolicy = sslPolicyFactory.GetPolicy(( string )config.Get(CausalClusteringSettings.ssl_policy));

            if (discoveryServiceFactory is SecureHazelcastDiscoveryServiceFactory)
            {
                (( SecureHazelcastDiscoveryServiceFactory )discoveryServiceFactory).SslPolicy = clusterSslPolicy;
            }
        }
Exemple #3
0
        ///
        /// <param name="platformModule"> </param>
        /// <param name="discoveryServiceFactory"> </param>
        /// <param name="clusterStateDirectory"> </param>
        /// <param name="identityModule"> </param>
        /// <param name="dependencies"> </param>
        /// <param name="databaseLayout">
        /// @return </param>
        protected internal virtual ClusteringModule GetClusteringModule(PlatformModule platformModule, DiscoveryServiceFactory discoveryServiceFactory, ClusterStateDirectory clusterStateDirectory, IdentityModule identityModule, Dependencies dependencies, DatabaseLayout databaseLayout)
        {
            SslPolicyLoader sslPolicyFactory = ( SslPolicyLoader )dependencies.SatisfyDependency(SslPolicyLoader.create(this.Config, this.LogProvider));
            SslPolicy       sslPolicy        = sslPolicyFactory.GetPolicy(( string )this.Config.get(CausalClusteringSettings.SslPolicy));

            if (discoveryServiceFactory is SecureHazelcastDiscoveryServiceFactory)
            {
                (( SecureHazelcastDiscoveryServiceFactory )discoveryServiceFactory).SslPolicy = sslPolicy;
            }

            return(new ClusteringModule(discoveryServiceFactory, identityModule.Myself(), platformModule, clusterStateDirectory.Get(), databaseLayout));
        }