public abstract class SortFieldProvider extends implements NamedSPILoader.NamedSPI
Modifier and Type | Field and Description |
---|---|
protected |
name
The name this SortFieldProvider is registered under
|
Modifier | Constructor and Description |
---|---|
protected |
name)
Creates a new SortFieldProvider.
|
Modifier and Type | Method and Description |
---|---|
static <> |
availableSortFieldProviders()
Lists all available SortFieldProviders
|
static SortFieldProvider |
name)
Looks up a SortFieldProvider by name
|
|
getName() |
abstract SortField |
readSortField(DataInput in)
Reads a SortField from serialized bytes
|
static void |
classLoader)
Reloads the SortFieldProvider list from the given .
|
static void |
write(SortField sf,
DataOutput output)
Writes a SortField to a DataOutput
|
abstract void |
writeSortField(SortField sf,
DataOutput out)
Writes a SortField to a DataOutput
This is used to record index sort information in segment headers
|
protected SortFieldProvider( name)
The provided name will be written into the index segment: in order to for the segment to be read this class should be registered with Java's SPI mechanism (registered in META-INF/ of your jar file, etc).
name
- must be all ascii alphanumeric, and less than 128 characters in length.public static name)
public static <> availableSortFieldProviders()
public static void reloadSortFieldProviders( classLoader)
availableSortFieldProviders()
()},...) stay consistent.
NOTE: Only new SortFieldProviders are added, existing ones are never removed or replaced.
This method is expensive and should only be called for discovery of new SortFieldProviders on the given classpath/classloader!
public static void write(SortField sf, DataOutput output) throws
public getName()
getName
in interface NamedSPILoader.NamedSPI
public abstract SortField readSortField(DataInput in) throws
public abstract void writeSortField(SortField sf, DataOutput out) throws
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.