org.apache.lucene.benchmark.byTask.feeds
Class RandomFacetSource

java.lang.Object
  extended by org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
      extended by org.apache.lucene.benchmark.byTask.feeds.FacetSource
          extended by org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource
All Implemented Interfaces:
Closeable

public class RandomFacetSource
extends FacetSource

Simple implementation of a random facet source

Supports the following parameters:


Field Summary
 
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
 
Constructor Summary
RandomFacetSource()
           
 
Method Summary
 void close()
          Called when reading from this content source is no longer required.
 void getNextFacets(List<CategoryPath> facets)
          Fills the next facets content items in the given list.
 void setConfig(Config config)
          Sets the Config for this content source.
 
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.FacetSource
resetInputs
 
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomFacetSource

public RandomFacetSource()
Method Detail

getNextFacets

public void getNextFacets(List<CategoryPath> facets)
                   throws NoMoreDataException,
                          IOException
Description copied from class: FacetSource
Fills the next facets content items in the given list. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextFacets in class FacetSource
Throws:
NoMoreDataException
IOException

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.