public class TimeRoutedAlias extends Object implements RoutedAlias
RoutedAlias.SupportedRouterTypes
Modifier and Type | Field and Description |
---|---|
static Set<String> |
OPTIONAL_ROUTER_PARAMS
Optional parameters for creating a routed alias excluding parameters for collection creation.
|
static Set<String> |
REQUIRED_ROUTER_PARAMS
Parameters required for creating a routed alias
|
static String |
ROUTER_AUTO_DELETE_AGE |
static String |
ROUTER_INTERVAL |
static String |
ROUTER_MAX_FUTURE |
static String |
ROUTER_PREEMPTIVE_CREATE_MATH |
static String |
ROUTER_START |
static RoutedAlias.SupportedRouterTypes |
TYPE |
CREATE_COLLECTION_PREFIX, MINIMAL_REQUIRED_PARAMS, ROUTED_ALIAS_NAME_CORE_PROP, ROUTER_FIELD, ROUTER_TYPE_NAME
Modifier and Type | Method and Description |
---|---|
String |
computeInitialCollectionName()
Create the initial collection for this RoutedAlias if applicable.
|
Instant |
computeNextCollTimestamp(Instant fromTimestamp)
Computes the timestamp of the next collection given the timestamp of the one before.
|
String |
createCollectionsIfRequired(AddUpdateCommand cmd)
Create any required collections and return the name of the collection to which the current document should be sent.
|
static String |
formatCollectionNameFromInstant(String aliasName,
Instant timestamp) |
Map<String,String> |
getAliasMetadata() |
String |
getAliasName()
The name of the alias.
|
String |
getAutoDeleteAgeMath() |
String |
getIntervalMath() |
long |
getMaxFutureMs() |
Set<String> |
getOptionalParams() |
String |
getPreemptiveCreateWindow() |
Set<String> |
getRequiredParams() |
String |
getRouteField() |
TimeZone |
getTimeZone() |
static Instant |
parseInstantFromCollectionName(String aliasName,
String collection) |
String |
toString() |
boolean |
updateParsedCollectionAliases(ZkController zkController)
Ensure our parsed version of the alias collection list is up to date.
|
void |
validateRouteValue(AddUpdateCommand cmd)
Check that the value we will be routing on is legal for this type of routed alias.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromProps, newAliasMustExistException
public static final RoutedAlias.SupportedRouterTypes TYPE
public static final String ROUTER_START
public static final String ROUTER_INTERVAL
public static final String ROUTER_MAX_FUTURE
public static final String ROUTER_AUTO_DELETE_AGE
public static final String ROUTER_PREEMPTIVE_CREATE_MATH
public static final Set<String> REQUIRED_ROUTER_PARAMS
public String computeInitialCollectionName()
RoutedAlias
computeInitialCollectionName
in interface RoutedAlias
public static Instant parseInstantFromCollectionName(String aliasName, String collection)
public static String formatCollectionNameFromInstant(String aliasName, Instant timestamp)
public boolean updateParsedCollectionAliases(ZkController zkController)
RoutedAlias
updateParsedCollectionAliases
in interface RoutedAlias
public String getAliasName()
RoutedAlias
getAliasName
in interface RoutedAlias
public String getRouteField()
getRouteField
in interface RoutedAlias
public String getIntervalMath()
public long getMaxFutureMs()
public String getPreemptiveCreateWindow()
public String getAutoDeleteAgeMath()
public TimeZone getTimeZone()
public Instant computeNextCollTimestamp(Instant fromTimestamp)
public void validateRouteValue(AddUpdateCommand cmd) throws SolrException
RoutedAlias
validateRouteValue
in interface RoutedAlias
cmd
- the command containing the documentSolrException
public String createCollectionsIfRequired(AddUpdateCommand cmd)
RoutedAlias
createCollectionsIfRequired
in interface RoutedAlias
cmd
- The command that might cause collection creationpublic Map<String,String> getAliasMetadata()
getAliasMetadata
in interface RoutedAlias
public Set<String> getRequiredParams()
getRequiredParams
in interface RoutedAlias
public Set<String> getOptionalParams()
getOptionalParams
in interface RoutedAlias
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.