public abstract class ConstrainedBinaryIndexer extends Object
ConstrainedBinaryIndexer.Registration
.Modifier and Type | Class and Description |
---|---|
static interface |
ConstrainedBinaryIndexer.Registration
The annotation to register
ConstrainedBinaryIndexer with constraints on
the scanned binary. |
Constructor and Description |
---|
ConstrainedBinaryIndexer() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
index(Map<String,? extends Iterable<? extends FileObject>> files,
Context context)
Indexes given binary root.
|
protected 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.
|
protected void |
scanFinished(Context context)
Notifies the indexer that scanning of a binary root just finished.
|
protected boolean |
scanStarted(Context context)
Notifies the indexer that a binary root is going to be scanned.
|
protected abstract void index(@NonNull Map<String,? extends Iterable<? extends FileObject>> files, @NonNull Context context)
files
- the files passed the file name and mime type constrain check,
categorized by the mime types. When only file name check is done the files
are passed with the mime type content/unknown
context
- of indexer, contains information about index storage, indexed root.protected boolean scanStarted(@NonNull Context context)
context
- The indexed binary root.false
means that the whole root should be rescanned
(eg. no up to date check is done, etc)protected void scanFinished(@NonNull Context context)
context
- The indexed binary root.protected void rootsRemoved(@NonNull Iterable<? extends URL> removedRoots)
removedRoots
- the iterable of removed roots