public abstract class RoutedAlias extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
RoutedAlias.Action |
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_COLLECTION_PREFIX |
static Set<String> |
MINIMAL_REQUIRED_PARAMS |
static String |
ROUTED_ALIAS_NAME_CORE_PROP |
static String |
ROUTER_FIELD |
static String |
ROUTER_TYPE_NAME |
Constructor and Description |
---|
RoutedAlias() |
Modifier and Type | Method and Description |
---|---|
protected abstract List<RoutedAlias.Action> |
calculateActions(String targetCol)
Determine the combination of adds/deletes implied by the arrival of a document destined for the
specified collection.
|
String |
createCollectionsIfRequired(AddUpdateCommand cmd)
Create any required collections and return the name of the collection to which the current document should be sent.
|
static RoutedAlias |
fromProps(String aliasName,
Map<String,String> props)
Factory method for implementations of this interface.
|
abstract String |
getAliasName()
The name of the alias.
|
protected abstract String |
getHeadCollectionIfOrdered(AddUpdateCommand cmd)
Calculate the head collection (i.e.
|
abstract Set<String> |
getOptionalParams() |
abstract Set<String> |
getRequiredParams() |
static SolrException |
newAliasMustExistException(String aliasName) |
abstract boolean |
updateParsedCollectionAliases(ZkStateReader zkStateReader,
boolean conextualize)
Ensure our parsed version of the alias collection list is up to date.
|
abstract void |
validateRouteValue(AddUpdateCommand cmd)
Check that the value we will be routing on is legal for this type of routed alias.
|
public static final String ROUTER_TYPE_NAME
public static final String ROUTER_FIELD
public static final String CREATE_COLLECTION_PREFIX
public static final String ROUTED_ALIAS_NAME_CORE_PROP
public static SolrException newAliasMustExistException(String aliasName)
public static RoutedAlias fromProps(String aliasName, Map<String,String> props) throws SolrException
aliasName
- The alias name (will be returned by getAliasName()
props
- The properties from an overseer message.SolrException
- If the properties are invalid or the router type is unknown.public abstract boolean updateParsedCollectionAliases(ZkStateReader zkStateReader, boolean conextualize)
public abstract String getAliasName()
public abstract void validateRouteValue(AddUpdateCommand cmd) throws SolrException
cmd
- the command containing the documentSolrException
public String createCollectionsIfRequired(AddUpdateCommand cmd)
cmd
- The command that might cause collection creationprotected abstract String getHeadCollectionIfOrdered(AddUpdateCommand cmd)
protected abstract List<RoutedAlias.Action> calculateActions(String targetCol)
targetCol
- the collection for which a document is destined.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.