/// <summary> /// Serialize /// <see cref="#deleted"/> /// /// </summary> /// <exception cref="System.IO.IOException"/> private void WriteDeleted(DataOutput @out, SnapshotFSImageFormat.ReferenceMap referenceMap ) { IList <INode> deleted = GetList(Diff.ListType.Deleted); @out.WriteInt(deleted.Count); foreach (INode node in deleted) { FSImageSerialization.SaveINode2Image(node, @out, true, referenceMap); } }
/// <exception cref="System.IO.IOException"/> public virtual void WriteINodeReferenceWithCount(INodeReference.WithCount withCount , DataOutput @out, bool writeUnderConstruction) { INode referred = withCount.GetReferredINode(); long id = withCount.GetId(); bool firstReferred = !referenceMap.Contains(id); @out.WriteBoolean(firstReferred); if (firstReferred) { FSImageSerialization.SaveINode2Image(referred, @out, writeUnderConstruction, this ); referenceMap[id] = withCount; } else { @out.WriteLong(id); } }