예제 #1
0
파일: FileMetadata.cs 프로젝트: jfloff/PADI
        // 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;
        }
예제 #2
0
 public TableEntry(FileMetadata metadata)
 {
     this.metadata = metadata;
 }
예제 #3
0
파일: FileMetadata.cs 프로젝트: jfloff/PADI
        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);
        }