public abstract class SourceIndexerFactory extends Object
CustomIndexerFactory
and EmbeddingIndexerFactory
.
The indexer factory should never subclass this class. It should always subclass either the CustomIndexerFactory
or EmbeddingIndexerFactory
The IndexingSupport
can be used to implement the SourceIndexerFactory
Constructor and Description |
---|
SourceIndexerFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
filesDeleted(Iterable<? extends Indexable> deleted,
Context context)
Called by indexing infrastructure to allow indexer to clean indexes for deleted files.
|
abstract void |
filesDirty(Iterable<? extends Indexable> dirty,
Context context)
Called by indexing infrastructure to notify indexer that a file was modified and so its
index may contain stale data.
|
abstract String |
getIndexerName()
Return the name of this indexer.
|
abstract int |
getIndexVersion()
Return the version stamp of the schema that is currently being stored
by this indexer.
|
int |
getPriority()
Returns a priority of the indexer.
|
void |
rootsRemoved(Iterable<? extends URL> removedRoots)
Called by indexing infrastructure to notify indexer that roots were deregistered,
for example the project owning these roots was closed.
|
void |
scanFinished(Context context)
Notifies the indexer that scanning of a source root just finished.
|
boolean |
scanStarted(Context context)
Notifies the indexer that a source root is going to be scanned.
|
public boolean scanStarted(Context context)
context
- The indexed source root.false
means that the whole root should be rescanned
(eg. no up to date check is done, etc)
If the IndexingSupport
is used to implement the SourceIndexerFactory
the implementation of this method should delegate to IndexingSupport.isValid()
public void scanFinished(Context context)
context
- The indexed source root.public int getPriority()
public abstract void filesDeleted(Iterable<? extends Indexable> deleted, Context context)
deleted
- the collection of deleted Indexable
scontext
- an indexing context
If the IndexingSupport
is used to implement the SourceIndexerFactory
the implementation of this method should delegate to IndexingSupport.isValid()
public void rootsRemoved(Iterable<? extends URL> removedRoots)
removedRoots
- the iterable of removed roots
If the IndexingSupport
is used to implement the SourceIndexerFactory
the implementation of this method should delegate to IndexingSupport.removeDocuments(org.netbeans.modules.parsing.spi.indexing.Indexable)
public abstract void filesDirty(Iterable<? extends Indexable> dirty, Context context)
dirty
- the collection of dirty Indexable
scontext
- an indexing context
If IndexingSupport
is used to implement the SourceIndexerFactory
the implementation of this method should delegate to IndexingSupport.markDirtyDocuments(org.netbeans.modules.parsing.spi.indexing.Indexable)
public abstract String getIndexerName()
public abstract int getIndexVersion()