// for deep copies of dictionaries (snapshots) public FileMetadata Clone() { FileMetadata copy = new FileMetadata(this.filename, this.nbDataServers, this.readQuorum, this.writeQuorum); copy.currentNbDataServers = this.currentNbDataServers; copy.localFilenames = new Dictionary<string, string>(this.localFilenames); copy.locations = new Dictionary<string, string>(this.locations); return copy; }
public TableEntry(FileMetadata metadata) { this.metadata = metadata; }
public bool Equals(FileMetadata fileMetadata) { // If parameter is null return false: if ((object)fileMetadata == null) { return false; } return (this.filename == fileMetadata.filename) && (this.nbDataServers == fileMetadata.nbDataServers) && (this.currentNbDataServers == fileMetadata.currentNbDataServers) && (this.readQuorum == fileMetadata.readQuorum) && (this.writeQuorum == fileMetadata.writeQuorum) && (this.localFilenames == fileMetadata.localFilenames); }