Class TimeRoutedAlias
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.TimeRoutedAlias
-
public class TimeRoutedAlias extends Object
Holds configuration for a routed alias, and some common code and constants.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CREATE_COLLECTION_PREFIX
static List<String>
OPTIONAL_ROUTER_PARAMS
Optional parameters for creating a routed alias excluding parameters for collection creation.static List<String>
REQUIRED_ROUTER_PARAMS
Parameters required for creating a routed aliasstatic String
ROUTED_ALIAS_NAME_CORE_PROP
static String
ROUTER_AUTO_DELETE_AGE
static String
ROUTER_FIELD
static String
ROUTER_INTERVAL
static String
ROUTER_MAX_FUTURE
static String
ROUTER_PREEMPTIVE_CREATE_MATH
static String
ROUTER_PREFIX
static String
ROUTER_START
static String
ROUTER_TYPE_NAME
-
Constructor Summary
Constructors Constructor Description TimeRoutedAlias(String aliasName, Map<String,String> aliasMetadata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
computeNextCollTimestamp(Instant fromTimestamp)
Computes the timestamp of the next collection given the timestamp of the one before.static String
formatCollectionNameFromInstant(String aliasName, Instant timestamp)
String
getAliasName()
String
getAutoDeleteAgeMath()
String
getIntervalMath()
long
getMaxFutureMs()
String
getPreemptiveCreateWindow()
String
getRouteField()
TimeZone
getTimeZone()
List<Map.Entry<Instant,String>>
parseCollections(Aliases aliases, Supplier<SolrException> aliasNotExist)
Parses the timestamp from the collection list and returns them in reverse sorted order (most recent 1st)static Instant
parseInstantFromCollectionName(String aliasName, String collection)
String
toString()
-
-
-
Field Detail
-
ROUTER_PREFIX
public static final String ROUTER_PREFIX
- See Also:
- Constant Field Values
-
ROUTER_TYPE_NAME
public static final String ROUTER_TYPE_NAME
- See Also:
- Constant Field Values
-
ROUTER_FIELD
public static final String ROUTER_FIELD
- See Also:
- Constant Field Values
-
ROUTER_START
public static final String ROUTER_START
- See Also:
- Constant Field Values
-
ROUTER_INTERVAL
public static final String ROUTER_INTERVAL
- See Also:
- Constant Field Values
-
ROUTER_MAX_FUTURE
public static final String ROUTER_MAX_FUTURE
- See Also:
- Constant Field Values
-
ROUTER_PREEMPTIVE_CREATE_MATH
public static final String ROUTER_PREEMPTIVE_CREATE_MATH
- See Also:
- Constant Field Values
-
ROUTER_AUTO_DELETE_AGE
public static final String ROUTER_AUTO_DELETE_AGE
- See Also:
- Constant Field Values
-
CREATE_COLLECTION_PREFIX
public static final String CREATE_COLLECTION_PREFIX
- See Also:
- Constant Field Values
-
REQUIRED_ROUTER_PARAMS
public static final List<String> REQUIRED_ROUTER_PARAMS
Parameters required for creating a routed alias
-
OPTIONAL_ROUTER_PARAMS
public static final List<String> OPTIONAL_ROUTER_PARAMS
Optional parameters for creating a routed alias excluding parameters for collection creation.
-
ROUTED_ALIAS_NAME_CORE_PROP
public static final String ROUTED_ALIAS_NAME_CORE_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseInstantFromCollectionName
public static Instant parseInstantFromCollectionName(String aliasName, String collection)
-
formatCollectionNameFromInstant
public static String formatCollectionNameFromInstant(String aliasName, Instant timestamp)
-
getAliasName
public String getAliasName()
-
getRouteField
public String getRouteField()
-
getIntervalMath
public String getIntervalMath()
-
getMaxFutureMs
public long getMaxFutureMs()
-
getPreemptiveCreateWindow
public String getPreemptiveCreateWindow()
-
getAutoDeleteAgeMath
public String getAutoDeleteAgeMath()
-
getTimeZone
public TimeZone getTimeZone()
-
parseCollections
public List<Map.Entry<Instant,String>> parseCollections(Aliases aliases, Supplier<SolrException> aliasNotExist)
Parses the timestamp from the collection list and returns them in reverse sorted order (most recent 1st)
-
-