internal virtual bool NrtIsCurrent(SegmentInfos infos)
{
lock (this)
{
if (!infos.Equals(segmentInfos))
{
// if any structural changes (new segments), we are
// stale
return false;
}
else if (infos.Generation != segmentInfos.Generation)
{
// if any commit took place since we were opened, we
// are stale
return false;
}
else
{
return !docWriter.AnyChanges;
}
}
}