Exemplo n.º 1
0
        public Service()
        {
            Logs.Subscribe(entry =>
            {
                if (CachedLogs.Count > 5000)
                {
                    CachedLogs.Dequeue();
                }

                CachedLogs.Enqueue(entry);
            });
        }
Exemplo n.º 2
0
        public Service(ServiceDescription description)
        {
            Description = description;

            Logs.Subscribe(entry =>
            {
                if (CachedLogs.Count > 5000)
                {
                    CachedLogs.TryDequeue(out _);
                }

                CachedLogs.Enqueue(entry);
            });
        }
Exemplo n.º 3
0
        public Service(ServiceDescription description)
        {
            Description = description;

            Logs.Subscribe(entry =>
            {
                if (CachedLogs.Count > 5000)
                {
                    CachedLogs.TryDequeue(out _);
                }

                CachedLogs.Enqueue(entry);
            });

            ReplicaEvents.Subscribe(entry =>
            {
                entry.Replica.State = entry.State;
            });
        }