- All Superinterfaces:
AutoCloseable,Closeable,LifecycleComponent,org.elasticsearch.core.Releasable
- All Known Subinterfaces:
MutableLicenseService
- All Known Implementing Classes:
ClusterStateLicenseService
Interface to read the current license. Consumers should generally not need to read the license directly and should instead
prefer
XPackLicenseState and/or LicensedFeature to make license decisions.
This interface is not intended to be implemented by alternative implementations and exists for internal use only.-
Method Summary
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, start, stopMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
getLicense
License getLicense()Get the current license. Reading the license directly should generally be avoided and license decisions should generally preferXPackLicenseStateand/orLicensedFeature.- Returns:
- the current license, null or
LicensesMetadata.LICENSE_TOMBSTONEif no license is available.
-