org.modeshape.jcr.spi.index

## Interface IndexWriter

- All Known Implementing Classes:
    CompositeIndexWriter, NoOpQueryIndexWriter

      public interface IndexWriter

  Interface used to record in the indexes the changes to content.
  See Also:
    `IndexProvider.getIndexWriter()`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(String workspace, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties)` Add to the index the information about a node.
    `boolean` | `canBeSkipped()` Flag that defines whether this index may be skipped.
    `void` | `clearAllIndexes()` Clear all indexes of content.

- - ### Method Detail

    - #### canBeSkipped

          boolean canBeSkipped()

      Flag that defines whether this index may be skipped. This is usually the case when the writer has no indexes behind it.
      Returns:
        true if this index writer does not need to be called, or false otherwise

    - #### clearAllIndexes

          void clearAllIndexes()

      Clear all indexes of content. This method is typically called prior to a re-indexing operation.

    - #### add

          void add(String workspace,
                 NodeKey key,
                 Path path,
                 Name primaryType,
                 Set<Name> mixinTypes,
                 CachedNode.Properties properties)

      Add to the index the information about a node.
      Parameters:
        `workspace` - the workspace in which the node information should be available; may not be null
        `key` - the unique key for the node; may not be null
        `path` - the path of the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types for the node; may not be null but may be empty
        `properties` - the properties of the node; may not be null but may be empty

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