org.netbeans.modules.parsing.api/1 1.55.0 6

org.netbeans.modules.parsing.spi.indexing
Class ConstrainedBinaryIndexer

java.lang.Object
  extended by org.netbeans.modules.parsing.spi.indexing.ConstrainedBinaryIndexer

public abstract class ConstrainedBinaryIndexer
extends Object

An binary indexer with declared constraints on the binary. The subclasses of this indexer are registered by ConstrainedBinaryIndexer.Registration.

Since:
1.48

Nested Class Summary
static interface ConstrainedBinaryIndexer.Registration
          The annotation to register ConstrainedBinaryIndexer with constraints on the scanned binary.
 
Constructor Summary
ConstrainedBinaryIndexer()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstrainedBinaryIndexer

public ConstrainedBinaryIndexer()
Method Detail

index

protected abstract void index(@NonNull
                              Map<String,? extends Iterable<? extends FileObject>> files,
                              @NonNull
                              Context context)
Indexes given binary root.

Parameters:
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.

scanStarted

protected boolean scanStarted(@NonNull
                              Context context)
Notifies the indexer that a binary root is going to be scanned.

Parameters:
context - The indexed binary root.
Returns:
false means that the whole root should be rescanned (eg. no up to date check is done, etc)

scanFinished

protected void scanFinished(@NonNull
                            Context context)
Notifies the indexer that scanning of a binary root just finished.

Parameters:
context - The indexed binary root.

rootsRemoved

protected void rootsRemoved(@NonNull
                            Iterable<? extends URL> removedRoots)
Called by indexing infrastructure to notify indexer that roots were deregistered, for example the project owning these roots was closed. The indexer may free memory caches for given roots or do any other clean up.

Parameters:
removedRoots - the iterable of removed roots

org.netbeans.modules.parsing.api/1 1.55.0 6

Built on May 24 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.