Search in sources :

Example 1 with BuildInfo

use of com.hazelcast.instance.BuildInfo in project hazelcast by hazelcast.

the class LifecycleServiceImpl method fireLifecycleEvent.

public void fireLifecycleEvent(LifecycleEvent.LifecycleState lifecycleState) {
    final LifecycleEvent lifecycleEvent = new LifecycleEvent(lifecycleState);
    String revision = buildInfo.getRevision();
    if (isNullOrEmpty(revision)) {
        revision = "";
    } else {
        revision = " - " + revision;
        BuildInfo upstreamInfo = buildInfo.getUpstreamBuildInfo();
        if (upstreamInfo != null) {
            String upstreamRevision = upstreamInfo.getRevision();
            if (!isNullOrEmpty(upstreamRevision)) {
                revision += ", " + upstreamRevision;
            }
        }
    }
    getLogger().info("HazelcastClient " + buildInfo.getVersion() + " (" + buildInfo.getBuild() + revision + ") is " + lifecycleEvent.getState());
    executor.execute(new Runnable() {

        @Override
        public void run() {
            for (LifecycleListener lifecycleListener : lifecycleListeners.values()) {
                lifecycleListener.stateChanged(lifecycleEvent);
            }
        }
    });
}
Also used : BuildInfo(com.hazelcast.instance.BuildInfo) LifecycleEvent(com.hazelcast.core.LifecycleEvent) LifecycleListener(com.hazelcast.core.LifecycleListener)

Example 2 with BuildInfo

use of com.hazelcast.instance.BuildInfo in project hazelcast-jet by hazelcast.

the class XmlJetConfigBuilder method getReleaseVersion.

@Override
protected String getReleaseVersion() {
    BuildInfo buildInfo = BuildInfoProvider.getBuildInfo();
    JetBuildInfo jetBuildInfo = buildInfo.getJetBuildInfo();
    return jetBuildInfo.getVersion().substring(0, 3);
}
Also used : JetBuildInfo(com.hazelcast.instance.JetBuildInfo) BuildInfo(com.hazelcast.instance.BuildInfo) JetBuildInfo(com.hazelcast.instance.JetBuildInfo)

Example 3 with BuildInfo

use of com.hazelcast.instance.BuildInfo in project hazelcast by hazelcast.

the class BuildInfoPlugin method run.

@Override
public void run(DiagnosticsLogWriter writer) {
    writer.startSection("BuildInfo");
    writer.writeKeyValueEntry("Build", buildInfo.getBuild());
    // we convert to string to prevent formatting the number
    writer.writeKeyValueEntry("BuildNumber", "" + buildInfo.getBuildNumber());
    writer.writeKeyValueEntry("Revision", buildInfo.getRevision());
    BuildInfo upstreamBuildInfo = buildInfo.getUpstreamBuildInfo();
    if (upstreamBuildInfo != null) {
        writer.writeKeyValueEntry("UpstreamRevision", upstreamBuildInfo.getRevision());
    }
    writer.writeKeyValueEntry("Version", buildInfo.getVersion());
    writer.writeKeyValueEntry("SerialVersion", buildInfo.getSerializationVersion());
    writer.writeKeyValueEntry("Enterprise", buildInfo.isEnterprise());
    writer.endSection();
}
Also used : BuildInfo(com.hazelcast.instance.BuildInfo)

Example 4 with BuildInfo

use of com.hazelcast.instance.BuildInfo in project hazelcast by hazelcast.

the class AbstractXmlConfigHelper method getReleaseVersion.

@PrivateApi
public String getReleaseVersion() {
    BuildInfo buildInfo = BuildInfoProvider.getBuildInfo();
    String[] versionTokens = StringUtil.tokenizeVersionString(buildInfo.getVersion());
    return versionTokens[0] + "." + versionTokens[1];
}
Also used : BuildInfo(com.hazelcast.instance.BuildInfo) PrivateApi(com.hazelcast.spi.annotation.PrivateApi)

Example 5 with BuildInfo

use of com.hazelcast.instance.BuildInfo in project hazelcast by hazelcast.

the class DefaultNodeExtension method printNodeInfo.

@Override
public void printNodeInfo() {
    BuildInfo buildInfo = node.getBuildInfo();
    printBannersBeforeNodeInfo();
    String build = constructBuildString(buildInfo);
    printNodeInfoInternal(buildInfo, build);
}
Also used : BuildInfo(com.hazelcast.instance.BuildInfo)

Aggregations

BuildInfo (com.hazelcast.instance.BuildInfo)11 Address (com.hazelcast.cluster.Address)2 LifecycleEvent (com.hazelcast.core.LifecycleEvent)2 LifecycleListener (com.hazelcast.core.LifecycleListener)2 JetBuildInfo (com.hazelcast.instance.JetBuildInfo)1 DefaultNodeExtension (com.hazelcast.instance.impl.DefaultNodeExtension)1 Node (com.hazelcast.instance.impl.Node)1 WhoisMasterOp (com.hazelcast.internal.cluster.impl.operations.WhoisMasterOp)1 DefaultSerializationServiceBuilder (com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder)1 LoggingServiceImpl (com.hazelcast.logging.impl.LoggingServiceImpl)1 PrivateApi (com.hazelcast.spi.annotation.PrivateApi)1 HazelcastProperties (com.hazelcast.spi.properties.HazelcastProperties)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 MemberVersion (com.hazelcast.version.MemberVersion)1 Before (org.junit.Before)1 Test (org.junit.Test)1