/// <summary>
        /// Initializes a new instance of the <see cref="VegaServiceProviderReplica"/> class.
        /// </summary>
        /// <param name="serviceContext">Replicator service context.</param>
        public VegaServiceProviderReplica(ReplicatorServiceContext serviceContext)
        {
            this.serviceContext = serviceContext;

            // TODO: read directory name from setting
            this.operationLogger = new OperationLogger(this.serviceContext.ServiceContext.CodePackageActivationContext.LogDirectory);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VegaKvsService"/> class.
        /// </summary>
        /// <param name="context">Replicator service context.</param>
        public VegaKvsService(ReplicatorServiceContext context)
            : base(context.ServiceContext, new VegaServiceProviderReplica(context))
        {
            this.kvsData            = new MultiVersionDictionary <byte[]>();
            this.lastSequenceNumber = 0;

            // TODO: set a upper-limit
            this.pendingOperations = new BlockingCollection <PendingOperation>();

            this.serviceContext = context;
            this.serviceContext.ProcessReplicatedOperation = this.ProcessReplicatedOperation;
        }