org.hibernate.search.backend.impl.lucene

## Class WorkspaceHolder

- java.lang.Object
- - org.hibernate.search.backend.impl.lucene.WorkspaceHolder

-     public class WorkspaceHolder
      extends Object

  This will actually contain the Workspace and LuceneWork visitor implementation, reused per-DirectoryProvider. Both Workspace(s) and LuceneWorkVisitor(s) lifecycle are linked to the backend lifecycle (reused and shared by all transactions). The LuceneWorkVisitor(s) are stateless, the Workspace(s) are threadsafe.
  Author:
    Emmanuel Bernard, Sanne Grinovero

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WorkspaceHolder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor)`
    `void` | `applyWork(List<LuceneWork> workList, IndexingMonitor monitor)`
    `void` | `close()`
    `void` | `flushAndReleaseResources()`
    `Lock` | `getExclusiveWriteLock()`
    `LuceneBackendResources` | `getIndexResources()`
    `void` | `indexMappingChanged()`
    `void` | `initialize(Properties props, WorkerBuildContext context, IndexManager indexManager)`
    `void` | `setCustomWorkspace(AbstractWorkspaceImpl workspace)` If invoked before `initialize(Properties, WorkerBuildContext, IndexManager)` it can set a customized Workspace instance to be used by this backend.

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

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

- - ### Constructor Detail

    - #### WorkspaceHolder

          public WorkspaceHolder()

  - ### Method Detail

    - #### initialize

          public void initialize(Properties props,
                                 WorkerBuildContext context,
                                 IndexManager indexManager)

    - #### close

          public void close()

    - #### applyStreamWork

          public void applyStreamWork(LuceneWork singleOperation,
                                      IndexingMonitor monitor)

    - #### applyWork

          public void applyWork(List<LuceneWork> workList,
                                IndexingMonitor monitor)

    - #### getExclusiveWriteLock

          public Lock getExclusiveWriteLock()

    - #### getIndexResources

          public LuceneBackendResources getIndexResources()

    - #### setCustomWorkspace

          public void setCustomWorkspace(AbstractWorkspaceImpl workspace)

      If invoked before `initialize(Properties, WorkerBuildContext, IndexManager)` it can set a customized Workspace instance to be used by this backend.
      Parameters:
        `workspace` - the new workspace

    - #### indexMappingChanged

          public void indexMappingChanged()

    - #### flushAndReleaseResources

          public void flushAndReleaseResources()

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved