public abstract class PostingsFormat extends Object implements NamedSPILoader.NamedSPI
| Modifier and Type | Field and Description |
|---|---|
static PostingsFormat[] |
EMPTY |
| Modifier | Constructor and Description |
|---|---|
protected |
PostingsFormat(String name) |
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
availablePostingsFormats()
returns a list of all available format names
|
abstract FieldsConsumer |
fieldsConsumer(SegmentWriteState state)
Writes a new segment
|
abstract FieldsProducer |
fieldsProducer(SegmentReadState state)
Reads a segment.
|
static PostingsFormat |
forName(String name)
looks up a format by name
|
String |
getName() |
static void |
reloadPostingsFormats(ClassLoader classloader)
Reloads the postings format list from the given
ClassLoader. |
String |
toString() |
public static final PostingsFormat[] EMPTY
protected PostingsFormat(String name)
public final String getName()
getName in interface NamedSPILoader.NamedSPIpublic abstract FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
IOExceptionpublic abstract FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
IOExceptionpublic static PostingsFormat forName(String name)
public static Set<String> availablePostingsFormats()
public static void reloadPostingsFormats(ClassLoader classloader)
ClassLoader.
Changes to the postings formats are visible after the method ends, all
iterators (availablePostingsFormats(),...) stay consistent.
NOTE: Only new postings formats are added, existing ones are never removed or replaced.
This method is expensive and should only be called for discovery of new postings formats on the given classpath/classloader!
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.