public void Dispose() { ReplicationTask.Dispose(); if (storageEnvironment != null) { storageEnvironment.Dispose(); } metricsCounters.Dispose(); }
public void Dispose() { // give it 3 seconds to complete requests for (int i = 0; i < 30 && Interlocked.Read(ref metricsCounters.ConcurrentRequestsCount) > 0; i++) { Thread.Sleep(100); } ReplicationTask.Dispose(); if (storageEnvironment != null) { storageEnvironment.Dispose(); } metricsCounters.Dispose(); }