[indexes] IJPL-175210: comments & docs

GitOrigin-RevId: 2db885ccff578c197cb8206676d1bfdc75af488c
This commit is contained in:
Ruslan Cheremin
2025-11-13 01:22:42 +00:00
committed by intellij-monorepo-bot
parent faa9e3ac68
commit 7a677e8dff
2 changed files with 4 additions and 2 deletions
@@ -42,7 +42,7 @@ class AutoRefreshingOnVfsCloseRef<T : Closeable>(private val factory: (FSRecords
attributeAccessor?.close()
}
finally {
attributeAccessor = null
attributeAccessor = null //will be re-opened on next invoke() call
}
}
@@ -15,7 +15,8 @@ import java.nio.file.Path
/**
* This is a simple wrapper around [SpecializedFileAttributes], either fast or a regular one.
* The main function of this wrapper is to make the attribute auto-reopenable, with help of [AutoRefreshingOnVfsCloseRef]:
* which means that the storage will be automatically reset if VFS is rebuilt, and also automatically reopened, if [close]-ed
* which means that the storage will be automatically reset if VFS is rebuilt, and also automatically reopened, if
* used after [close]-ed
*
* @see AutoRefreshingOnVfsCloseRef
*/
@@ -27,6 +28,7 @@ sealed interface IntFileAttribute : Closeable, Unmappable {
return true
}
/** One should create a single instance per id -- an attempt to create >1 instance for the same id leads to an exception */
@JvmStatic
fun create(id: String, version: Int): IntFileAttribute {
val fast = shouldUseFastAttributes()