protected boolean versionMatch(short version, Address sender) { boolean match=Version.isBinaryCompatible(version); if(!match && log_discard_msgs_version && log.isWarnEnabled()) { if(suppress_log_different_version != null) suppress_log_different_version.log(SuppressLog.Level.warn, sender, suppress_time_different_version_warnings, sender, Version.print(version), Version.printVersion()); else log.warn(Util.getMessage("VersionMismatch"), sender, Version.print(version), Version.printVersion()); } return match; }
@ManagedAttribute public static String getVersion() {return Version.printDescription();}
@Override public void installServices(OperationContext context, ModelNode model) throws OperationFailedException { ROOT_LOGGER.activatingSubsystem(Version.printVersion());
System.out.println("version = " + version + " (" + Version.print(version) + ")"); byte flags=dis.readByte();
break; case 'v': System.out.printf("Version: %s\n", Version.printVersion()); break; case 'x':
System.out.println("version = " + version + " (" + Version.print(version) + ")"); byte flags=dis.readByte();
if(!Version.isBinaryCompatible(version)) throw new IOException("packet from " + client_sock.getInetAddress() + ":" + client_sock.getPort() + " has different version (" + Version.print(version) + ") from ours (" + Version.printVersion() + "); discarding it");
@Override public void installServices(OperationContext context, ModelNode model) throws OperationFailedException { ROOT_LOGGER.activatingSubsystem(Version.printVersion());
public String getVersion() { return Version.printDescription(); }
case 1: // version short version=buf.getShort(); if(!Version.isBinaryCompatible(version)) throw new IOException("packet from " + channel.getRemoteAddress() + " has different version (" + Version.print(version) + ") from ours (" + Version.printVersion() + "); discarding it"); recv_buf.add(ByteBuffer.allocate(Global.SHORT_SIZE)); break;
public void doStart() throws JGroupsClusterViewManagerException { LOGGER.debug("JGroups v{0}", org.jgroups.Version.printVersion());
@ManagedAttribute public static String getVersion() {return Version.printDescription();}
protected boolean versionMatch(short version, Address sender) { boolean match=Version.isBinaryCompatible(version); if(!match && log_discard_msgs_version && log.isWarnEnabled()) { if(suppress_log_different_version != null) suppress_log_different_version.log(SuppressLog.Level.warn, sender, suppress_time_different_version_warnings, sender, Version.print(version), Version.printVersion()); else log.warn(Util.getMessage("VersionMismatch"), sender, Version.print(version), Version.printVersion()); } return match; }
break; case 'v': System.out.printf("Version: %s\n", Version.printVersion()); break; case 'x':
/** * Checks whether ver is binary compatible with the current version. The rule for binary compatibility is that * the major and minor versions have to match, whereas micro versions can differ. * @param ver * @return */ public static boolean isBinaryCompatible(short ver) { if(ver == version) return true; short[] tmp=decode(ver); short tmp_major=tmp[0], tmp_minor=tmp[1]; return major == tmp_major && minor == tmp_minor; }
if(!Version.isBinaryCompatible(version)) throw new IOException("packet from " + client_sock.getInetAddress() + ":" + client_sock.getPort() + " has different version (" + Version.print(version) + ") from ours (" + Version.printVersion() + "); discarding it");
if(Version.isBinaryCompatible(version) == false) { if(log.isWarnEnabled()) log.warn(new StringBuffer("packet from ").append(client_addr).append(':').append(client_port). append(" has different version (").append(Version.print(version)).append(") from ours ("). append(Version.printVersion()).append("). This may cause problems"));