Search in sources :

Example 1 with ConfigurationService

use of com.hazelcast.internal.dynamicconfig.ConfigurationService in project hazelcast by hazelcast.

the class SetLicenseOperation method run.

@Override
public void run() throws Exception {
    DefaultNodeExtension nodeExtension = (DefaultNodeExtension) ((NodeEngineImpl) getNodeEngine()).getNode().getNodeExtension();
    nodeExtension.setLicenseKey(licenseKey);
    LicenseKey licenseKeyObject = new LicenseKey(licenseKey);
    ConfigurationService configurationService = getNodeEngine().getService(ClusterWideConfigurationService.SERVICE_NAME);
    configurationService.persist(licenseKeyObject);
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) DefaultNodeExtension(com.hazelcast.instance.impl.DefaultNodeExtension) ConfigurationService(com.hazelcast.internal.dynamicconfig.ConfigurationService) ClusterWideConfigurationService(com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService) LicenseKey(com.hazelcast.internal.config.LicenseKey)

Aggregations

DefaultNodeExtension (com.hazelcast.instance.impl.DefaultNodeExtension)1 LicenseKey (com.hazelcast.internal.config.LicenseKey)1 ClusterWideConfigurationService (com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService)1 ConfigurationService (com.hazelcast.internal.dynamicconfig.ConfigurationService)1 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)1