org.hibernate.search.backend.impl.lucene
Class SharedIndexWorkspaceImpl

java.lang.Object
  extended by org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl
      extended by org.hibernate.search.backend.impl.lucene.SharedIndexWorkspaceImpl
All Implemented Interfaces:
Workspace

public class SharedIndexWorkspaceImpl
extends AbstractWorkspaceImpl

Author:
Sanne Grinovero (C) 2011 Red Hat Inc.

Field Summary
 
Fields inherited from class org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl
writerHolder
 
Constructor Summary
SharedIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager, ErrorHandler errorHandler)
           
 
Method Summary
 void afterTransactionApplied(boolean someFailureHappened, boolean streaming)
          Invoked after all changes of a transaction are applied
 org.apache.lucene.index.IndexWriter getIndexWriter()
          Gets the IndexWriter, opening one if needed.
 org.apache.lucene.index.IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)
           
 
Methods inherited from class org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl
getAnalyzer, getDocumentBuilder, getEntitiesInIndexManager, incrementModificationCounter, optimizerPhase, performOptimization, shutDownNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedIndexWorkspaceImpl

public SharedIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager,
                                ErrorHandler errorHandler)
Method Detail

afterTransactionApplied

public void afterTransactionApplied(boolean someFailureHappened,
                                    boolean streaming)
Description copied from interface: Workspace
Invoked after all changes of a transaction are applied

Specified by:
afterTransactionApplied in interface Workspace
Specified by:
afterTransactionApplied in class AbstractWorkspaceImpl
Parameters:
someFailureHappened - usually false, set to true if errors where caught while using the IndexWriter
streaming - if no immediate visibility of the change is required (hint for performance)

getIndexWriter

public org.apache.lucene.index.IndexWriter getIndexWriter()
Description copied from interface: Workspace
Gets the IndexWriter, opening one if needed.

Specified by:
getIndexWriter in interface Workspace
Overrides:
getIndexWriter in class AbstractWorkspaceImpl
Returns:
a new IndexWriter or an already open one, or null if an error happened.

getIndexWriter

public org.apache.lucene.index.IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)
Overrides:
getIndexWriter in class AbstractWorkspaceImpl


Copyright © 2006-2012 Hibernate. All Rights Reserved.