in sdk/src/Core/Sampling/Reservior.cs [143:174]
internal void CopyFrom(Reservior r)
{
_lock.EnterWriteLock();
try
{
if (r.Quota != null)
{
Quota = r.Quota.Value;
}
if (r.TTL != null)
{
TTL = new TimeStamp();
TTL.CopyFrom(r.TTL);
}
if (r.Interval != null)
{
Interval = r.Interval.Value;
}
if (r._refereshedAt != null)
{
_refereshedAt = new TimeStamp();
_refereshedAt.CopyFrom(r._refereshedAt);
}
}
finally
{
_lock.ExitWriteLock();
}
}