/** * Calls toData() on its clientUpdateMessage present in the * haContainer (client-messages-region or the map). * * @param out * The output stream which the object should be written to. */ public void toData(DataOutput out) throws IOException { ClientUpdateMessageImpl cum = (ClientUpdateMessageImpl)this.haContainer .get(this); // If the dispatcher sends the cum object to the client and removes it from // the haContainer before we do haContainer.get() (above), we indicate that // by sending false boolean value. if (cum != null) { DataSerializer.writePrimitiveBoolean(true, out); DataSerializer.writeObject(cum.getEventId(), out); } else { DataSerializer.writePrimitiveBoolean(false, out); DataSerializer.writeObject(new EventID(), out); // Create a dummy ClientUpdateMessageImpl instance cum = new ClientUpdateMessageImpl(EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), null); } InternalDataSerializer.invokeToData(cum, out); if (cum.hasCqs()) { DataSerializer.writeConcurrentHashMap(cum.getClientCqs(), out); } }
/** * Calls toData() on its clientUpdateMessage present in the * haContainer (client-messages-region or the map). * * @param out * The output stream which the object should be written to. */ public void toData(DataOutput out) throws IOException { ClientUpdateMessageImpl cum = (ClientUpdateMessageImpl)this.haContainer .get(this); // If the dispatcher sends the cum object to the client and removes it from // the haContainer before we do haContainer.get() (above), we indicate that // by sending false boolean value. if (cum != null) { DataSerializer.writePrimitiveBoolean(true, out); DataSerializer.writeObject(cum.getEventId(), out); } else { DataSerializer.writePrimitiveBoolean(false, out); DataSerializer.writeObject(new EventID(), out); // Create a dummy ClientUpdateMessageImpl instance cum = new ClientUpdateMessageImpl(EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), null, null); } InternalDataSerializer.invokeToData(cum, out); if (cum.hasCqs()) { DataSerializer.writeConcurrentHashMap(cum.getClientCqs(), out); } }