org.modeshape.jcr.index.local

## Interface LocalIndex<T>

- Type Parameters:
    `T` - the type of value that is added to the index
  All Superinterfaces:
    Costable, Filter

      public interface LocalIndex<T>
      extends Filter, Costable

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.modeshape.jcr.spi.index.provider.Filter

      `Filter.Results`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(String nodeKey, T value)`
    `void` | `commit()`
    `String` | `getName()` Get the name of the index.
    `boolean` | `isNew()` Return whether this index is newly created and requires reindexing, or false if the index already exists.
    `void` | `remove(String nodeKey)`
    `void` | `remove(String nodeKey, T value)`
    `void` | `removeAll()` Remove all of the index entries from the index.
    `void` | `shutdown(boolean destroyed)` Shut down this index and release all runtime resources.

    - ### Methods inherited from interface org.modeshape.jcr.spi.index.provider.Filter

      `filter`

    - ### Methods inherited from interface org.modeshape.jcr.spi.index.provider.Costable

      `estimateCardinality, estimateTotalCount`

- - ### Method Detail

    - #### isNew

          boolean isNew()

      Return whether this index is newly created and requires reindexing, or false if the index already exists.
      Returns:
        true if the index is new and needs to be rebuilt, or false otherwise.

    - #### getName

          String getName()

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

    - #### removeAll

          void removeAll()

      Remove all of the index entries from the index. This is typically called prior to reindexing.

    - #### shutdown

          void shutdown(boolean destroyed)

      Shut down this index and release all runtime resources. If `destroyed` is `true`, then this index has been removed from the repository and will not be reused; thus all persistent resources should also be released. If `destroyed` is `false`, then this repository is merely shutting down and the index's persistent resources should be kept so that they are available when the repository is restarted.
      Parameters:
        `destroyed` - true if this index is being permanently removed from the repository and all runtime and persistent resources can/should be released and cleaned up, or false if the repository is being shutdown and this index will be needed the next time the repository is started

    - #### add

          void add(String nodeKey,
                 T value)

    - #### remove

          void remove(String nodeKey)

    - #### remove

          void remove(String nodeKey,
                    T value)

    - #### commit

          void commit()

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