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

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

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

public abstract class BinaryIndexerFactory
extends Object


Constructor Summary
BinaryIndexerFactory()
           
 
Method Summary
abstract  BinaryIndexer createIndexer()
          Creates new BinaryIndexer.
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.
abstract  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 binary root just finished.
 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

BinaryIndexerFactory

public BinaryIndexerFactory()
Method Detail

createIndexer

public abstract BinaryIndexer createIndexer()
Creates new BinaryIndexer.

Returns:
an indexer

rootsRemoved

public abstract 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. The indexer may free memory caches for given roots or do any other clean up.

Parameters:
removedRoots - the iterable of removed roots
Since:
1.19

getIndexerName

public abstract String getIndexerName()
Return the name of this indexer. This name should be unique because GSF will use this name to produce a separate data directory for each indexer where it has its own storage.

Returns:
The indexer name. This does not need to be localized since it is never shown to the user, but should contain filesystem safe characters.

getIndexVersion

public abstract int getIndexVersion()
Return the version stamp of the schema that is currently being stored by this indexer. Along with the index name this string will be used to create a unique data directory for the database. Whenever you incompatibly change what is stored by the indexer, update the version stamp.

Returns:
The version stamp of the current index.

scanStarted

public boolean scanStarted(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)
Since:
1.29

scanFinished

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

Parameters:
context - The indexed binary root.
Since:
1.29

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

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