@Override protected String[] getGroups(Message msg) throws IOException, ClassNotFoundException { String[] grp = null; Part p = msg.getPart(4); if (p != null) { grp = (String[]) p.getObject(); } return grp; }
@Override protected String[] getGroups(Message msg) throws IOException, ClassNotFoundException { String[] grp = null; Part p = msg.getPart(4); if (p != null) { grp = (String[]) p.getObject(); } return grp; }
@Override protected Object getOptionalCallbackArg(Message msg) throws ClassNotFoundException, IOException { Part callbackPart = msg.getPart(5); return callbackPart.getObject(); } @Override
private boolean isFlagSet(Message msg, int index) { boolean isSet = false; byte[] flags = null; Part p = msg.getPart(5); if (p != null) { flags = p.getSerializedForm(); if (flags != null && flags.length > index) { if (flags[index] == 1) { isSet = true; } } } return isSet; }
private boolean isFlagSet(Message msg, int index) { boolean isSet = false; byte[] flags = null; Part p = msg.getPart(5); if (p != null) { flags = p.getSerializedForm(); if (flags != null && flags.length > index) { if (flags[index] == 1) { isSet = true; } } } return isSet; }
@Override protected void processAck(Message msg, String opName) throws Exception { final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return; } else { Part part = msg.getPart(0); if (msgType == MessageType.EXCEPTION) { Throwable t = (Throwable) part.getObject(); if (t instanceof CommitConflictException || t instanceof SynchronizationCommitConflictException) { throw (GemFireException)t; } } super.processAck(msg, opName); } }
@Override protected void processAck(Message msg, String opName) throws Exception { final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return; } else { Part part = msg.getPart(0); if (msgType == MessageType.EXCEPTION) { Throwable t = (Throwable) part.getObject(); if (t instanceof CommitConflictException || t instanceof SynchronizationCommitConflictException) { throw (GemFireException)t; } } super.processAck(msg, opName); } }
@Override protected Object processResponse(Message msg) throws Exception { final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return null; } else { Part part = msg.getPart(0); if (msgType == MessageType.EXCEPTION) { Throwable t = (Throwable)part.getObject(); logger.warn(LocalizedMessage.create(LocalizedStrings.EXECUTE_FUNCTION_NO_HAS_RESULT_RECEIVED_EXCEPTION), t); } else if (isErrorResponse(msgType)) { logger.warn(LocalizedMessage.create(LocalizedStrings.EXECUTE_FUNCTION_NO_HAS_RESULT_RECEIVED_EXCEPTION)); // TODO:LOG:FIXED: used to include part.getString()); but it wouldn't have been printed } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } return null; } }
@Override protected Object processResponse(Message msg) throws Exception { final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return null; } else { Part part = msg.getPart(0); if (msgType == MessageType.EXCEPTION) { Throwable t = (Throwable)part.getObject(); logger.warn(LocalizedMessage.create(LocalizedStrings.EXECUTE_FUNCTION_NO_HAS_RESULT_RECEIVED_EXCEPTION), t); } else if (isErrorResponse(msgType)) { logger.warn(LocalizedMessage.create(LocalizedStrings.EXECUTE_FUNCTION_NO_HAS_RESULT_RECEIVED_EXCEPTION)); // TODO:LOG:FIXED: was ", part.getString());" which makes no sense } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } return null; } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return Integer.valueOf(part.getInt()); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxIdForEnum"; throw new ServerOperationException(s, (Throwable) part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } } @Override
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return Integer.valueOf(part.getInt()); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxIdForEnum"; throw new ServerOperationException(s, (Throwable) part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } } @Override
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return Integer.valueOf(part.getInt()); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxIdForType"; throw new ServerOperationException(s, (Throwable) part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } } @Override
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return Integer.valueOf(part.getInt()); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxIdForType"; throw new ServerOperationException(s, (Throwable) part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } } @Override
@Override protected Object processResponse(Message msg, Connection con) throws Exception { processAck(msg, "invalidate"); LogWriterI18n log = InternalDistributedSystem.getLoggerI18n(); boolean isReply = (msg.getMessageType() == MessageType.REPLY); int partIdx = 0; int flags = 0; if (isReply) { flags = msg.getPart(partIdx++).getInt(); if ((flags & HAS_VERSION_TAG) != 0) { VersionTag tag = (VersionTag)msg.getPart(partIdx++).getObject(); // we use the client's ID since we apparently don't track the server's ID in connections tag.replaceNullIDs((InternalDistributedMember) con.getEndpoint().getMemberId()); this.event.setVersionTag(tag); if (log.fineEnabled()) { log.fine("received Invalidate response with " + tag); } } else if (log.fineEnabled()) { log.fine("received Invalidate response"); } } return null; } @Override
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return (Map<Integer, EnumInfo>) part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxEnums"; throw new ServerOperationException(s, (Throwable) part.getObject()); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return (Map<Integer, EnumInfo>) part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxEnums"; throw new ServerOperationException(s, (Throwable) part.getObject()); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return (Map<Integer, PdxType>) part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxTypes"; throw new ServerOperationException(s, (Throwable) part.getObject()); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return (Map<Integer, PdxType>) part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + "getPdxTypes"; throw new ServerOperationException(s, (Throwable) part.getObject()); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return part.getObject(); } else if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote proxy cache close"; throw new ServerOperationException(s, (Throwable)part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } }
@Override protected Object processResponse(Message msg) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.REPLY) { return part.getObject(); } else if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote proxy cache close"; throw new ServerOperationException(s, (Throwable)part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java // Part exceptionToStringPart = msg.getPart(1); } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } }