org.hibernate.search.backend.impl
Class StreamingSelectionVisitor

java.lang.Object
  extended by org.hibernate.search.backend.impl.StreamingSelectionVisitor
All Implemented Interfaces:
WorkVisitor<StreamingOperationSelectionDelegate>

public class StreamingSelectionVisitor
extends Object
implements WorkVisitor<StreamingOperationSelectionDelegate>

This visitor applies the selection logic from the plugged IndexShardingStrategies to stream operations, as used by optimize() and batching operations. Using a visitor/selector pattern for different implementations of addAsPayLoadsToQueue depending on the type of LuceneWork.

Author:
Sanne Grinovero

Field Summary
static StreamingSelectionVisitor INSTANCE
           
 
Method Summary
 StreamingOperationSelectionDelegate getDelegate(AddLuceneWork addLuceneWork)
           
 StreamingOperationSelectionDelegate getDelegate(DeleteLuceneWork deleteLuceneWork)
           
 StreamingOperationSelectionDelegate getDelegate(FlushLuceneWork flushLuceneWork)
           
 StreamingOperationSelectionDelegate getDelegate(OptimizeLuceneWork optimizeLuceneWork)
           
 StreamingOperationSelectionDelegate getDelegate(PurgeAllLuceneWork purgeAllLuceneWork)
           
 StreamingOperationSelectionDelegate getDelegate(UpdateLuceneWork addLuceneWork)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final StreamingSelectionVisitor INSTANCE
Method Detail

getDelegate

public StreamingOperationSelectionDelegate getDelegate(AddLuceneWork addLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>

getDelegate

public StreamingOperationSelectionDelegate getDelegate(UpdateLuceneWork addLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>

getDelegate

public StreamingOperationSelectionDelegate getDelegate(DeleteLuceneWork deleteLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>

getDelegate

public StreamingOperationSelectionDelegate getDelegate(OptimizeLuceneWork optimizeLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>

getDelegate

public StreamingOperationSelectionDelegate getDelegate(PurgeAllLuceneWork purgeAllLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>

getDelegate

public StreamingOperationSelectionDelegate getDelegate(FlushLuceneWork flushLuceneWork)
Specified by:
getDelegate in interface WorkVisitor<StreamingOperationSelectionDelegate>


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved