org.modeshape.jcr.spi.index.provider

## Interface Index

-     public interface Index

  A provider-specific index used by the query system to quickly provide the set of `NodeKey`s that satisfy a particular portion of a query.

  Each time ModeShape uses this index, it calls the `filter(IndexFilter)` method to obtain an `Index.Operation` instance that ModeShape will then use to `access` the batches of node keys that satisfy the given `IndexFilter`. Note that once an `Index.Operation` is obtained, it may not be called if the query is cancelled before this index is needed.

  See Also:
    `IndexProvider.getIndex(String)`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Index.Operation` A potentially executable stateful operation that returns the set of nodes that satisfies the constraints supplied when the operation is `created`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Index.Operation` | `filter(IndexFilter filter)` Return a `Index.Operation` instance that ModeShape can when it actually wants the results.
    `String` | `getName()` Get the name of this index.
    `String` | `getProviderName()` Get the name of the `IndexProvider` that owns this index.
    `boolean` | `supportsFullTextConstraints()` Return whether this index can use full-text search constraints.

- - ### Method Detail

    - #### getProviderName

          String getProviderName()

      Get the name of the `IndexProvider` that owns this index.
      Returns:
        the provider's `name`; never null

    - #### getName

          String getName()

      Get the name of this index.
      Returns:
        the index name; never null

    - #### supportsFullTextConstraints

          boolean supportsFullTextConstraints()

      Return whether this index can use full-text search constraints. Such indexes may be used in some queries even if they are not the lowest-cost option.
      Returns:
        true if this index can use full-text search constraints, or false otherwise.

    - #### filter

          Index.Operation filter(IndexFilter filter)

      Return a `Index.Operation` instance that ModeShape can when it actually wants the results. Note that this method should return quickly, since ideally no work is really done other than instantiating and populating the `Index.Operation` instance. Instead, all work should be performed when the resulting Operation's `Index.Operation.getNextBatch(ResultWriter, int)` method is called.
      Parameters:
        `filter` - the filter to be applied by this index; never null
      Returns:
        the batched node keys; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.