IndexVersionDiff (@NotNull ID<?, ?> indexId, int currentIndexVersion) { IndexVersion version = getIndexVersion(indexId); if (version.myIndexVersion == -1) return new IndexVersionDiff.InitialBuild(currentIndexVersion); if (version.myIndexVersion != currentIndexVersion) { return new IndexVersionDiff.VersionChanged(version.myIndexVersion, currentIndexVersion, "index version"); } if (version.myCommonIndicesVersion != getVersion()) { return new IndexVersionDiff.VersionChanged(version.myCommonIndicesVersion, getVersion(), "common index version"); } long timestamp = FSRecords.getCreationTimestamp(); if (version.myVfsCreationStamp != timestamp) { return new IndexVersionDiff.VersionChanged(version.myVfsCreationStamp, timestamp, "vfs creation stamp"); } return IndexVersionDiff.UP_TO_DATE; }