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);
}
}
});
}
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);
}
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();
}
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];
}
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);
}
Aggregations