ALL_COMMANDS.put(Version.GFE_662, gfe662Commands); gfe662Commands.putAll(ALL_COMMANDS.get(Version.GFE_66)); gfe662Commands.put(MessageType.ADD_PDX_ENUM, AddPdxEnum.getCommand()); gfe662Commands.put(MessageType.GET_PDX_ID_FOR_ENUM, GetPDXIdForEnum.getCommand()); gfe662Commands.put(MessageType.GET_PDX_ENUM_BY_ID, GetPDXEnumById.getCommand());
@Override public void cmdExecute(Message msg, ServerConnection servConn, long start) throws IOException, ClassNotFoundException { servConn.setAsTrue(REQUIRES_RESPONSE); if (logger.isDebugEnabled()) { logger.debug("{}: Received get pdx id for enum request ({} parts) from {}", servConn.getName(), msg.getNumberOfParts(), servConn.getSocketString()); } int noOfParts = msg.getNumberOfParts(); EnumInfo enumInfo = (EnumInfo) msg.getPart(0).getObject(); int enumId = msg.getPart(1).getInt(); try { GemFireCacheImpl cache = (GemFireCacheImpl) servConn.getCache(); TypeRegistry registry = cache.getPdxRegistry(); registry.addRemoteEnum(enumId, enumInfo); } catch (Exception e) { writeException(msg, e, false, servConn); servConn.setAsTrue(RESPONDED); return; } writeReply(msg, servConn); servConn.setAsTrue(RESPONDED); } }
@Override public void cmdExecute(Message msg, ServerConnection servConn, long start) throws IOException, ClassNotFoundException { servConn.setAsTrue(REQUIRES_RESPONSE); if (logger.fineEnabled()) { logger.fine(servConn.getName() + ": Received get pdx id for enum request (" + msg.getNumberOfParts() + " parts) from " + servConn.getSocketString()); } int noOfParts = msg.getNumberOfParts(); EnumInfo enumInfo = (EnumInfo) msg.getPart(0).getObject(); int enumId = msg.getPart(1).getInt(); try { GemFireCacheImpl cache = (GemFireCacheImpl) servConn.getCache(); TypeRegistry registry = cache.getPdxRegistry(); registry.addRemoteEnum(enumId, enumInfo); } catch (Exception e) { writeException(msg, e, false, servConn); servConn.setAsTrue(RESPONDED); return; } writeReply(msg, servConn); servConn.setAsTrue(RESPONDED); } }
ALL_COMMANDS.put(Version.GFE_662, gfe662Commands); gfe662Commands.putAll(ALL_COMMANDS.get(Version.GFE_66)); gfe662Commands.put(MessageType.ADD_PDX_ENUM, AddPdxEnum.getCommand()); gfe662Commands.put(MessageType.GET_PDX_ID_FOR_ENUM, GetPDXIdForEnum.getCommand()); gfe662Commands.put(MessageType.GET_PDX_ENUM_BY_ID, GetPDXEnumById.getCommand());