@ParametersAreNonnullByDefault public class ApplicationConfigurationLicenseStore extends Object implements LicenseStoreInternal
| Constructor and Description |
|---|
ApplicationConfigurationLicenseStore(com.atlassian.config.ApplicationConfiguration store,
com.atlassian.extras.api.LicenseManager manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearLicenseFromMemory()
Clears the currently installed from memory, causing it to be re-read from persistent the next time
LicenseStore.retrieve() is called. |
void |
install(String licenseString)
This delegates to
ApplicationConfiguration.setProperty(Object, Object) but the underlying code does not
call ApplicationConfiguration.save() and is thus only in memory for the time being. |
void |
installTransiently(String licenseString)
Attempts to install the given license transiently.
|
void |
onRemoteEvent(ClusterEventWrapper wrapper) |
com.atlassian.extras.api.AtlassianLicense |
retrieve()
Retrieves the currently installed license.
|
Optional<com.atlassian.extras.api.AtlassianLicense> |
retrieveOptional()
Only useful during setup.
|
public ApplicationConfigurationLicenseStore(com.atlassian.config.ApplicationConfiguration store,
com.atlassian.extras.api.LicenseManager manager)
public void install(String licenseString)
ApplicationConfiguration.setProperty(Object, Object) but the underlying code does not
call ApplicationConfiguration.save() and is thus only in memory for the time being.
This method does not allow concurrent invocation, thus escaping if one was detected. The reason being is that a concurrent license installation could lead to unexpected behaviour, thus we let the first invocation win and encourage the second one to be re-evaluated before being attempted again.
install in interface LicenseStorelicenseString - the encrypted licenseLicenseService.validate(String)public void installTransiently(String licenseString)
LicenseStoreinstallTransiently in interface LicenseStorepublic void clearLicenseFromMemory()
LicenseStoreLicenseStore.retrieve() is called. It is provided for testing purposes only.clearLicenseFromMemory in interface LicenseStore@Nonnull public com.atlassian.extras.api.AtlassianLicense retrieve()
LicenseStoreretrieve in interface LicenseStore@Nonnull public Optional<com.atlassian.extras.api.AtlassianLicense> retrieveOptional() throws LicenseException
LicenseStoreInternalretrieveOptional in interface LicenseStoreInternalLicenseException - if the license is set, but cannot be parsed, or if the license store lock cannot be
acquired.@EventListener public void onRemoteEvent(ClusterEventWrapper wrapper)
Copyright © 2003–2018 Atlassian. All rights reserved.