Esempio n. 1
0
 /// <exception cref="System.IO.IOException"/>
 public virtual void ValidateStorage(NNStorage storage)
 {
     if (layoutVersion != storage.GetLayoutVersion() || namespaceID != storage.GetNamespaceID
             () || cTime != storage.cTime || !clusterID.Equals(storage.GetClusterID()) || !blockPoolID
         .Equals(storage.GetBlockPoolID()))
     {
         throw new IOException("Inconsistent namespace information:\n" + "NamespaceInfo has:\n"
                               + "LV=" + layoutVersion + ";" + "NS=" + namespaceID + ";" + "cTime=" + cTime +
                               ";" + "CID=" + clusterID + ";" + "BPID=" + blockPoolID + ".\nStorage has:\n" + "LV="
                               + storage.GetLayoutVersion() + ";" + "NS=" + storage.GetNamespaceID() + ";" + "cTime="
                               + storage.GetCTime() + ";" + "CID=" + storage.GetClusterID() + ";" + "BPID=" +
                               storage.GetBlockPoolID() + ".");
     }
 }