public final class GistManagerImpl extends GistManager
Constructor and Description |
---|
GistManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
invalidateData()
Force all gists to be recalculated on the next request.
|
<Data> PsiFileGist<Data> |
newPsiFileGist(java.lang.String id,
int version,
DataExternalizer<Data> externalizer,
NullableFunction<PsiFile,Data> calculator)
Create a new
PsiFileGist . |
<Data> VirtualFileGist<Data> |
newVirtualFileGist(java.lang.String id,
int version,
DataExternalizer<Data> externalizer,
VirtualFileGist.GistCalculator<Data> calcData)
Create a new
VirtualFileGist . |
void |
resetReindexCount() |
getInstance
public <Data> VirtualFileGist<Data> newVirtualFileGist(java.lang.String id, int version, DataExternalizer<Data> externalizer, VirtualFileGist.GistCalculator<Data> calcData)
GistManager
VirtualFileGist
.newVirtualFileGist
in class GistManager
Data
- the type of the data to cacheid
- a unique identifier of this dataversion
- should be incremented each time the externalizer
or calcData
logic changes.externalizer
- used to store the data to the disk and retrieve itcalcData
- calculates the data by the file content when neededVirtualFileGist.getFileData(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)
can later be used to retrieve the cached datapublic <Data> PsiFileGist<Data> newPsiFileGist(java.lang.String id, int version, DataExternalizer<Data> externalizer, NullableFunction<PsiFile,Data> calculator)
GistManager
PsiFileGist
.newPsiFileGist
in class GistManager
Data
- the type of the data to cacheid
- a unique identifier of this dataversion
- should be incremented each time the externalizer
or calcData
logic changes.externalizer
- used to store the data to the disk and retrieve itcalculator
- calculates the data by the file content when neededPsiFileGist.getFileData(com.intellij.psi.PsiFile)
can later be used to retrieve the cached datapublic void invalidateData()
GistManager
invalidateData
in class GistManager
public void resetReindexCount()