Class EsqlLicenseChecker
java.lang.Object
org.elasticsearch.xpack.esql.session.EsqlLicenseChecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckQueryApproximation(XPackLicenseState licenseState) static ElasticsearchStatusExceptioninvalidLicenseForCcsException(XPackLicenseState licenseState) static booleanisCcsAllowed(XPackLicenseState licenseState) Only call this method once you know the user is doing a cross-cluster query, as it will update the license_usage timestamp for the esql-ccs feature if the license is Enterprise (or Trial).
-
Constructor Details
-
EsqlLicenseChecker
public EsqlLicenseChecker()
-
-
Method Details
-
isCcsAllowed
Only call this method once you know the user is doing a cross-cluster query, as it will update the license_usage timestamp for the esql-ccs feature if the license is Enterprise (or Trial).- Parameters:
licenseState-- Returns:
- true if the user has a license that allows ESQL CCS.
-
invalidLicenseForCcsException
public static ElasticsearchStatusException invalidLicenseForCcsException(XPackLicenseState licenseState) - Parameters:
licenseState- existing license state. Need to extract info on the current installed license.- Returns:
- ElasticsearchStatusException with an error message informing the caller what license is needed to run ES|QL cross-cluster searches and what license (if any) was found.
-
checkQueryApproximation
public static void checkQueryApproximation(XPackLicenseState licenseState) throws ElasticsearchStatusException - Parameters:
licenseState- existing license state. Need to extract info on the current installed license.- Throws:
ElasticsearchStatusException- if query approximation is not supported.
-