use of org.apache.geode.internal.cache.DistributedPutAllOperation.EntryVersionsList in project geode by apache.
the class RemoteRemoveAllMessage method fromData.
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.eventId = (EventID) DataSerializer.readObject(in);
this.callbackArg = DataSerializer.readObject(in);
this.posDup = (flags & POS_DUP) != 0;
if ((flags & HAS_BRIDGE_CONTEXT) != 0) {
this.bridgeContext = DataSerializer.readObject(in);
}
this.removeAllDataCount = (int) InternalDataSerializer.readUnsignedVL(in);
this.removeAllData = new RemoveAllEntryData[removeAllDataCount];
if (this.removeAllDataCount > 0) {
final Version version = InternalDataSerializer.getVersionForDataStreamOrNull(in);
final ByteArrayDataInput bytesIn = new ByteArrayDataInput();
for (int i = 0; i < this.removeAllDataCount; i++) {
this.removeAllData[i] = new RemoveAllEntryData(in, this.eventId, i, version, bytesIn);
}
boolean hasTags = in.readBoolean();
if (hasTags) {
EntryVersionsList versionTags = EntryVersionsList.create(in);
for (int i = 0; i < this.removeAllDataCount; i++) {
this.removeAllData[i].versionTag = versionTags.get(i);
}
}
}
}
use of org.apache.geode.internal.cache.DistributedPutAllOperation.EntryVersionsList in project geode by apache.
the class RemoteRemoveAllMessage method toData.
@Override
public void toData(DataOutput out) throws IOException {
super.toData(out);
DataSerializer.writeObject(this.eventId, out);
DataSerializer.writeObject(this.callbackArg, out);
if (this.bridgeContext != null) {
DataSerializer.writeObject(this.bridgeContext, out);
}
InternalDataSerializer.writeUnsignedVL(this.removeAllDataCount, out);
if (this.removeAllDataCount > 0) {
EntryVersionsList versionTags = new EntryVersionsList(removeAllDataCount);
boolean hasTags = false;
for (int i = 0; i < this.removeAllDataCount; i++) {
if (!hasTags && removeAllData[i].versionTag != null) {
hasTags = true;
}
VersionTag<?> tag = removeAllData[i].versionTag;
versionTags.add(tag);
removeAllData[i].versionTag = null;
this.removeAllData[i].toData(out);
this.removeAllData[i].versionTag = tag;
}
out.writeBoolean(hasTags);
if (hasTags) {
InternalDataSerializer.invokeToData(versionTags, out);
}
}
}
Aggregations