static RedisCluster()
 {
     // We get the static ctor to do the actual registration of the factory
     // method.  Cluster.Register merely triggers the CLR to invoke this
     // ctor.
     ClusterFactory.RegisterProvider("redis", factory);
 }
示例#2
0
        /// <summary>
        /// Connect to a cluster
        /// </summary>
        /// <param name="providerName">Provider name is a unique name for the persistence layer
        /// type, for example: "redis"</param>
        /// <param name="config">Cluster config</param>
        public static ICluster connect(
            string providerName,
            ClusterConfig config)
        {
            var cluster = ClusterFactory.CreateCluster(providerName, config);

            cluster.Connect();
            return(cluster);
        }
示例#3
0
        /// <summary>
        /// Connect to a cluster
        /// </summary>
        /// <param name="providerName">Provider name is a unique name for the persistence layer
        /// type, for example: "redis"</param>
        /// <param name="config">Cluster config</param>
        public static Unit connect(
            string providerName,
            ClusterConfig config)
        {
            var cluster = ClusterFactory.CreateCluster(providerName, config);

            cluster.Connect();
            return(ActorContext.RegisterCluster(cluster));
        }
示例#4
0
        /// <summary>
        /// Connect to a cluster
        /// </summary>
        /// <param name="providerName">Provider name is a unique name for the persistence layer
        /// type, for example: "redis"</param>
        /// <param name="nodeName">Unique name for this process.  It becomes the name of the root
        /// node and allows other services on the cluster to discover you and communicate with you.
        /// </param>
        /// <param name="connectionString">Provider defined connection string</param>
        /// <param name="catalogueName">>Provider defined catalogue name</param>
        public static Unit connect(
            string providerName,
            ProcessName nodeName,
            string connectionString,
            string catalogueName
            )
        {
            var cluster = ClusterFactory.CreateCluster(providerName, config(nodeName, connectionString, catalogueName));

            cluster.Connect();
            return(ActorContext.RegisterCluster(cluster));
        }
示例#5
0
        /// <summary>
        /// Connect to a cluster
        /// </summary>
        /// <param name="providerName">Provider name is a unique name for the persistence layer
        /// type, for example: "redis"</param>
        /// <param name="nodeName">Unique name for this process.  It becomes the name of the root
        /// node and allows other services on the cluster to discover you and communicate with you.
        /// </param>
        /// <param name="connectionString">Provider defined connection string</param>
        /// <param name="catalogueName">>Provider defined catalogue name</param>
        public static ICluster connect(
            string providerName,
            ProcessName nodeName,
            string connectionString,
            string catalogueName,
            ProcessName role
            )
        {
            var cluster = ClusterFactory.CreateCluster(providerName, config(nodeName, connectionString, catalogueName, role));

            cluster.Connect();
            return(cluster);
        }