"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tc-messaging/src/main/java/com/tc/entity/ResendVoltronEntityMessage.java" between
terracotta-core-5.7.0.tar.gz and terracotta-core-5.7.1.tar.gz

About: Terracotta - Clustering technology for Java ("Network Attached Memory", "Distributed Cache"). Source code of the server (5.x) core components.

ResendVoltronEntityMessage.java  (terracotta-core-5.7.0):ResendVoltronEntityMessage.java  (terracotta-core-5.7.1)
skipping to change at line 22 skipping to change at line 22
* *
* The Covered Software is Terracotta Core. * The Covered Software is Terracotta Core.
* *
* The Initial Developer of the Covered Software is * The Initial Developer of the Covered Software is
* Terracotta, Inc., a Software AG company * Terracotta, Inc., a Software AG company
* *
*/ */
package com.tc.entity; package com.tc.entity;
import com.tc.bytes.TCByteBuffer; import com.tc.bytes.TCByteBuffer;
import com.tc.bytes.TCByteBufferFactory;
import com.tc.io.TCByteBufferInput; import com.tc.io.TCByteBufferInput;
import com.tc.io.TCByteBufferOutput; import com.tc.io.TCByteBufferOutput;
import com.tc.io.TCSerializable; import com.tc.io.TCSerializable;
import com.tc.net.ClientID; import com.tc.net.ClientID;
import com.tc.object.EntityDescriptor; import com.tc.object.EntityDescriptor;
import com.tc.object.tx.TransactionID; import com.tc.object.tx.TransactionID;
import com.tc.util.Assert; import com.tc.util.Assert;
import java.io.IOException; import java.io.IOException;
skipping to change at line 46 skipping to change at line 45
* This implementation of VoltronEntityMessage is purely to handle the case of t ransaction resends when the message data * This implementation of VoltronEntityMessage is purely to handle the case of t ransaction resends when the message data
* is required, but it is sent as part of a larger message, not as a stand-alone message. * is required, but it is sent as part of a larger message, not as a stand-alone message.
*/ */
public class ResendVoltronEntityMessage implements VoltronEntityMessage, TCSeria lizable<ResendVoltronEntityMessage> { public class ResendVoltronEntityMessage implements VoltronEntityMessage, TCSeria lizable<ResendVoltronEntityMessage> {
private ClientID source; private ClientID source;
private TransactionID transactionID; private TransactionID transactionID;
private EntityDescriptor entityDescriptor; private EntityDescriptor entityDescriptor;
private Type type; private Type type;
private boolean requiresReplication; private boolean requiresReplication;
private TCByteBuffer extendedData; private TCByteBuffer extendedData;
private TransactionID oldestTransactionPending;
public ResendVoltronEntityMessage() { public ResendVoltronEntityMessage() {
// to make TCSerializable happy // to make TCSerializable happy
} }
public ResendVoltronEntityMessage(ClientID source, TransactionID transactionID , EntityDescriptor entityDescriptor, Type type, boolean requiresReplication, TCB yteBuffer extendedData, TransactionID oldestTransactionPending) { public ResendVoltronEntityMessage(ClientID source, TransactionID transactionID , EntityDescriptor entityDescriptor, Type type, boolean requiresReplication, TCB yteBuffer extendedData) {
this.source = source; this.source = source;
this.transactionID = transactionID; this.transactionID = transactionID;
this.entityDescriptor = entityDescriptor; this.entityDescriptor = entityDescriptor;
this.type = type; this.type = type;
this.requiresReplication = requiresReplication; this.requiresReplication = requiresReplication;
this.extendedData = extendedData == null || extendedData.isReadOnly() ? exte ndedData : extendedData.asReadOnlyBuffer(); this.extendedData = extendedData == null || extendedData.isReadOnly() ? exte ndedData : extendedData.asReadOnlyBuffer();
this.oldestTransactionPending = oldestTransactionPending;
} }
@Override @Override
public ClientID getSource() { public ClientID getSource() {
Assert.assertNotNull(this.source); Assert.assertNotNull(this.source);
return this.source; return this.source;
} }
@Override @Override
public TransactionID getTransactionID() { public TransactionID getTransactionID() {
Assert.assertNotNull(this.transactionID); Assert.assertNotNull(this.transactionID);
skipping to change at line 110 skipping to change at line 107
} }
@Override @Override
public TCByteBuffer getExtendedData() { public TCByteBuffer getExtendedData() {
Assert.assertNotNull(this.extendedData); Assert.assertNotNull(this.extendedData);
return this.extendedData.duplicate(); return this.extendedData.duplicate();
} }
@Override @Override
public TransactionID getOldestTransactionOnClient() { public TransactionID getOldestTransactionOnClient() {
return this.oldestTransactionPending; return TransactionID.FIRST_ID;
} }
@Override @Override
public void serializeTo(TCByteBufferOutput serialOutput) { public void serializeTo(TCByteBufferOutput serialOutput) {
this.source.serializeTo(serialOutput); this.source.serializeTo(serialOutput);
serialOutput.writeLong(this.transactionID.toLong()); serialOutput.writeLong(this.transactionID.toLong());
this.entityDescriptor.serializeTo(serialOutput); this.entityDescriptor.serializeTo(serialOutput);
serialOutput.writeInt(this.type.ordinal()); serialOutput.writeInt(this.type.ordinal());
serialOutput.writeBoolean(this.requiresReplication); serialOutput.writeBoolean(this.requiresReplication);
serialOutput.writeInt(extendedData.remaining()); serialOutput.writeInt(extendedData.remaining());
serialOutput.write(extendedData.duplicate()); serialOutput.write(extendedData.duplicate());
serialOutput.writeLong(this.oldestTransactionPending.toLong()); serialOutput.writeLong(TransactionID.FIRST_ID.toLong());
} }
@Override @Override
public ResendVoltronEntityMessage deserializeFrom(TCByteBufferInput serialInpu t) throws IOException { public ResendVoltronEntityMessage deserializeFrom(TCByteBufferInput serialInpu t) throws IOException {
this.source = ClientID.readFrom(serialInput); this.source = ClientID.readFrom(serialInput);
this.transactionID = new TransactionID(serialInput.readLong()); this.transactionID = new TransactionID(serialInput.readLong());
this.entityDescriptor = EntityDescriptor.readFrom(serialInput); this.entityDescriptor = EntityDescriptor.readFrom(serialInput);
this.type = Type.values()[serialInput.readInt()]; this.type = Type.values()[serialInput.readInt()];
this.requiresReplication = serialInput.readBoolean(); this.requiresReplication = serialInput.readBoolean();
int bufferLength = serialInput.readInt(); int bufferLength = serialInput.readInt();
this.extendedData = serialInput.read(bufferLength); this.extendedData = serialInput.read(bufferLength);
this.oldestTransactionPending = new TransactionID(serialInput.readLong()); long compatRead = serialInput.readLong();
return this; return this;
} }
@Override @Override
public EntityMessage getEntityMessage() { public EntityMessage getEntityMessage() {
// There is no built-in message. // There is no built-in message.
return null; return null;
} }
} }
 End of changes. 7 change blocks. 
7 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)