Exemple #1
0
        // 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;
        }
Exemple #2
0
 public TableEntry(FileMetadata metadata)
 {
     this.metadata = metadata;
 }
Exemple #3
0
        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);
        }