OLD | NEW |
1 /* Copyright (c) 2011-2012 Stanford University | 1 /* Copyright (c) 2011-2012 Stanford University |
2 * | 2 * |
3 * Permission to use, copy, modify, and distribute this software for any | 3 * Permission to use, copy, modify, and distribute this software for any |
4 * purpose with or without fee is hereby granted, provided that the above | 4 * purpose with or without fee is hereby granted, provided that the above |
5 * copyright notice and this permission notice appear in all copies. | 5 * copyright notice and this permission notice appear in all copies. |
6 * | 6 * |
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES | 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES |
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHORS BE LIABLE FOR | 9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHORS BE LIABLE FOR |
10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | 10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 /** | 187 /** |
188 * Whether this server is believed to be up, crashed, or down. | 188 * Whether this server is believed to be up, crashed, or down. |
189 * The crashed state initiates some operations throughout the cluster | 189 * The crashed state initiates some operations throughout the cluster |
190 * (backup recovery) and also indicates that resources needed to recover | 190 * (backup recovery) and also indicates that resources needed to recover |
191 * this server (replicas) need to be retained until this server is | 191 * this server (replicas) need to be retained until this server is |
192 * completely removed from the cluster. | 192 * completely removed from the cluster. |
193 */ | 193 */ |
194 ServerStatus status; | 194 ServerStatus status; |
195 | 195 |
196 /** | 196 /** |
197 * Each segment's replicas are replicated on a set of backups, called | 197 * The replication Id identifies a replication group for this server. |
198 * a replication group. Each group has a unique Id. The default Id is 0. | 198 * Each server belongs to a single replication group. With MinCopysets, |
| 199 * the segment's replicas are deterministically replicated on the |
| 200 * backups that are part of the server's replication group. |
| 201 * Each group has a unique Id. The default Id is 0. |
199 */ | 202 */ |
200 uint64_t replicationId; | 203 uint64_t replicationId; |
201 }; | 204 }; |
202 | 205 |
203 /** | 206 /** |
204 * Exception type thrown by the ServerList class. | 207 * Exception type thrown by the ServerList class. |
205 */ | 208 */ |
206 struct ServerListException : public Exception { | 209 struct ServerListException : public Exception { |
207 ServerListException(const CodeLocation& where, std::string msg) | 210 ServerListException(const CodeLocation& where, std::string msg) |
208 : Exception(where, msg) {} | 211 : Exception(where, msg) {} |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 /// modify any state in the server list. | 303 /// modify any state in the server list. |
301 mutable std::mutex mutex; | 304 mutable std::mutex mutex; |
302 | 305 |
303 typedef std::unique_lock<std::mutex> Lock; | 306 typedef std::unique_lock<std::mutex> Lock; |
304 DISALLOW_COPY_AND_ASSIGN(AbstractServerList); | 307 DISALLOW_COPY_AND_ASSIGN(AbstractServerList); |
305 }; | 308 }; |
306 | 309 |
307 } //namespace RAMCloud | 310 } //namespace RAMCloud |
308 | 311 |
309 #endif ///!RAMCLOUD_ABSTRACTSERVERLIST_H | 312 #endif ///!RAMCLOUD_ABSTRACTSERVERLIST_H |
OLD | NEW |