org.modeshape.jcr.spi.index

## Class IndexChangeSetListeners

- java.lang.Object
- - org.modeshape.jcr.spi.index.IndexChangeSetListeners

-     public class IndexChangeSetListeners
      extends Object

  A set of utilities that create `ChangeSetListener` implementations for updating indexes. The listener implementations do manage much of the complexity of processing `ChangeSet`s and determining which changes are relevant for an index. All of the logic that defines how the indexes are updated is delegated the the `IndexChangeSetListeners.SingleColumnIndexOperations` and `IndexChangeSetListeners.MultiColumnIndexOperations` implementations provided by the caller.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `IndexChangeSetListeners.IndexChangeSetListener`
    `static interface` | `IndexChangeSetListeners.MultiColumnIndexOperations` A predicate function that determines whether the changes in a specified workspace should be processed.
    `protected static class` | `IndexChangeSetListeners.MultiPropertyIndexChangeSetListener`
    `protected static interface` | `IndexChangeSetListeners.NodeTypePredicate`
    `static interface` | `IndexChangeSetListeners.SingleColumnIndexOperations` A predicate function that determines whether the changes in a specified workspace should be processed.
    `protected static class` | `IndexChangeSetListeners.SinglePropertyIndexChangeSetListener`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ChangeSetListener` | `create(ExecutionContext context, NodeTypes.Supplier nodeTypesSupplier, IndexDefinition indexDefinition, IndexChangeSetListeners.MultiColumnIndexOperations operations)` Create a new ChangeSetListener implementation that can update multi-column indexes.
    `static ChangeSetListener` | `create(ExecutionContext context, NodeTypes.Supplier nodeTypesSupplier, IndexDefinition indexDefinition, IndexChangeSetListeners.SingleColumnIndexOperations operations)` Create a new ChangeSetListener implementation that can update single-column indexes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static ChangeSetListener create(ExecutionContext context,
                                 NodeTypes.Supplier nodeTypesSupplier,
                                 IndexDefinition indexDefinition,
                                 IndexChangeSetListeners.SingleColumnIndexOperations operations)

      Create a new ChangeSetListener implementation that can update single-column indexes. The listener will correctly determine when the indexed property has been added, changed or removed, and will call the supplied functions appropriately.
      Parameters:
        `context` - the execution context that should be used by the listener; may not be null
        `nodeTypesSupplier` - the supplier for the immutable `NodeTypes` snapshot; may not be null
        `indexDefinition` - the definition of the single column index; may not be null and must have a `single column`
        `operations` - the operations that will be called to update the index; may not be null
      Returns:
        the listener; never null

    - #### create

          public static ChangeSetListener create(ExecutionContext context,
                                 NodeTypes.Supplier nodeTypesSupplier,
                                 IndexDefinition indexDefinition,
                                 IndexChangeSetListeners.MultiColumnIndexOperations operations)

      Create a new ChangeSetListener implementation that can update multi-column indexes. The listener will correctly determine when
      Parameters:
        `context` - the execution context that should be used by the listener; may not be null
        `nodeTypesSupplier` - the supplier for the immutable `NodeTypes` snapshot; may not be null
        `indexDefinition` - the definition of the single column index; may not be null and must have a `single column`
        `operations` - the operations that will be called to update the index; may not be null
      Returns:
        the listener; never null

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