예제 #1
0
                ///// <summary>
                /////     The collection of initiated lists on the node.
                ///// </summary>
                // private readonly ConcurrentDictionary<string, object> listMap = new ConcurrentDictionary<string, object>();

                ///// <summary>
                /////     The collection of initiated queue on the node.
                ///// </summary>
                // private readonly ConcurrentDictionary<string, object> queueMap = new ConcurrentDictionary<string, object>();

                ///// <summary>
                /////     The collection of initiated sets on the node.
                ///// </summary>
                // private readonly ConcurrentDictionary<string, object> setMap = new ConcurrentDictionary<string, object>();

                /// <summary>
                ///     Initializes a new instance of the <see cref="Node" /> class.
                /// </summary>
                /// <param name="configuration">The server configuration.</param>
                /// <param name="curator">The cluster curator.</param>
                /// <param name="logger">The logger.</param>
                /// <exception cref="Exceptions.GridionException">
                ///     When there are presented some issues with server initialization then a <see cref="Exceptions.GridionException" />
                ///     is thrown.
                /// </exception>
                internal Node(ServerConfiguration configuration, IClusterCurator curator, ILogger logger)
                {
                    Should.NotBeNull(configuration, nameof(configuration));
                    Should.NotBeNull(curator, nameof(curator));
                    Should.NotBeNull(logger, nameof(logger));

                    this.gridionServer       = GridionServerFactory.RegisterNewServer(configuration);
                    this.inMessengerService  = new MemoryMessengerService();
                    this.outMessengerService = new MemoryMessengerService();
                    this.curator             = curator;
                    this.logger = logger;
                    this.id     = Guid.NewGuid();
                }
예제 #2
0
파일: Node.cs 프로젝트: bluetsys/gridion
        ///// <summary>
        /////     The collection of initiated lists on the node.
        ///// </summary>
        // private readonly ConcurrentDictionary<string, object> listMap = new ConcurrentDictionary<string, object>();

        ///// <summary>
        /////     The collection of initiated queue on the node.
        ///// </summary>
        // private readonly ConcurrentDictionary<string, object> queueMap = new ConcurrentDictionary<string, object>();

        ///// <summary>
        /////     The collection of initiated sets on the node.
        ///// </summary>
        // private readonly ConcurrentDictionary<string, object> setMap = new ConcurrentDictionary<string, object>();

        /// <summary>
        ///     Initializes a new instance of the <see cref="Node" /> class.
        /// </summary>
        /// <param name="configuration">The server configuration.</param>
        /// <param name="curator">The cluster curator.</param>
        /// <param name="logger">The logger.</param>
        /// <exception cref="GridionException">
        ///     When there are presented some issues with server initialization then a <see cref="GridionException" /> is thrown.
        /// </exception>
        public Node(
            GridionServerConfiguration configuration,
            IClusterCurator curator,
            ILogger logger)
        {
            Should.NotBeNull(configuration, nameof(configuration));
            Should.NotBeNull(curator, nameof(curator));
            Should.NotBeNull(logger, nameof(logger));

            this.gridionServer       = GridionServerFactory.RegisterNewServer(configuration);
            this.inMessengerService  = new MemoryMessengerService(curator);
            this.outMessengerService = new MemoryMessengerService(curator);
            this.logger = logger;
        }