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

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

public class ExclusiveIndexWorkspaceImpl
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
ExclusiveIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager, WorkerBuildContext context, Properties cfg)
           
 
Method Summary
 void afterTransactionApplied(boolean someFailureHappened, boolean streaming)
          Invoked after all changes of a transaction are applied.
 void flush()
          Makes sure eventually pending changes are made visible to IndexReaders.
 void notifyWorkApplied(LuceneWork work)
          Some workspaces need this to determine for example the kind of flush operations which are safe to apply.
 
Methods inherited from class org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl
areSingleTermDeletesSafe, getAnalyzer, getDocumentBuilder, getEntitiesInIndexManager, getIndexWriter, getIndexWriter, incrementModificationCounter, optimizerPhase, performOptimization, shutDownNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExclusiveIndexWorkspaceImpl

public ExclusiveIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager,
                                   WorkerBuildContext context,
                                   Properties cfg)
Method Detail

afterTransactionApplied

public void afterTransactionApplied(boolean someFailureHappened,
                                    boolean streaming)
Description copied from interface: Workspace
Invoked after all changes of a transaction are applied. Must be invoked strictly once after every Workspace.getIndexWriter() in a finally block as implementations might rely on counters to release the IndexWriter.

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)

flush

public void flush()
Description copied from interface: Workspace
Makes sure eventually pending changes are made visible to IndexReaders.


notifyWorkApplied

public void notifyWorkApplied(LuceneWork work)
Description copied from interface: Workspace
Some workspaces need this to determine for example the kind of flush operations which are safe to apply. Generally used for statistics.

Parameters:
work - the LuceneWork which was just processed


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