public static String toString(short ordinal) { if (ordinal <= CURRENT.ordinal) { try { return fromOrdinal(ordinal, false).toString(); } catch (UnsupportedVersionException uve) { // ignored in toString() } } return "UNKNOWN[ordinal=" + ordinal + ']'; }
in = new VersionedDataInputStream(in, Version.fromOrdinal(serverVersion, false)); try { Object response = DataSerializer.readObject(in);
private Version readProductVersionRecord(DataInput dis, File f) throws IOException { Version recoveredGFVersion; short ver = Version.readOrdinal(dis); try { recoveredGFVersion = Version.fromOrdinal(ver, false); } catch (UnsupportedVersionException e) { throw new DiskAccessException(LocalizedStrings.Oplog_UNEXPECTED_PRODUCT_VERSION_0.toLocalizedString(ver), e, getParent()); } logger.trace(LogMarker.PERSIST_RECOVERY, "version={}", recoveredGFVersion); readEndOfRecord(dis); return recoveredGFVersion; }
log.debug("Locator reading request from " + sock.getInetAddress() + " with version " + Version.fromOrdinal(versionOrdinal, false)); input = new VersionedDataInputStream(input, Version.fromOrdinal( versionOrdinal, false)); request = DataSerializer.readObject(input); DataOutputStream output = new DataOutputStream(sock.getOutputStream()); if (versionOrdinal != Version.CURRENT_ORDINAL) { output = new VersionedDataOutputStream(output, Version.fromOrdinal(versionOrdinal, false));
Version clientVersion = null; try { clientVersion = Version.fromOrdinal(clientVersionOrdinal, true); if (logger.isDebugEnabled()) { logger.debug("{}: Registering client with version: {}", this, clientVersion);
clientVersion = Version.fromOrdinal(clientVersionOrdinal, true);
/** * Handle a {@link DSFIDNotFoundException} indicating a message type is not * implemented on another server (for example due to different product * version). Default implementation logs the exception as severe and moves on. * * Rationale for default handling: New operations can have caused changes to * other newer versioned GFE JVMs that cannot be reverted. So ignoring * exceptions is a conservative way considering such scenarios. It will be * upto individual messages to handle differently by overriding the above * method. */ protected synchronized void processException(DistributionMessage msg, DSFIDNotFoundException ex) { final short versionOrdinal = ex.getProductVersionOrdinal(); String versionStr = null; try { Version version = Version.fromOrdinal(versionOrdinal, false); versionStr = version.toString(); } catch (UnsupportedVersionException e) { } if (versionStr == null) { versionStr = "Ordinal=" + versionOrdinal; } logger.fatal(LocalizedMessage.create(LocalizedStrings.ReplyProcessor21_UNKNOWN_DSFID_ERROR, new Object[] { ex.getUnknownDSFID(), msg.getSender(), versionStr }), ex); }
this.version = netMbr.getVersionOrdinal(); try { this.versionObj = Version.fromOrdinal(version, false); } catch (UnsupportedVersionException e) { this.versionObj = Version.CURRENT;
this.versionObj = Version.fromOrdinal(version, false); } catch (UnsupportedVersionException e) { this.versionObj = Version.CURRENT;
gfversion = Version.fromOrdinal(ver, false); } catch (UnsupportedVersionException e) { throw new DiskAccessException(LocalizedStrings