@@ -162,7 +162,7 @@ struct CollectionMetaData {
162162/* *
163163 * The metadata of a single scope
164164 *
165- * Default construction yields the default collection
165+ * Default construction yields the default scope
166166 */
167167struct ScopeMetaData {
168168 ScopeID sid{ScopeID::Default}; // The scope's ID
@@ -173,137 +173,6 @@ struct ScopeMetaData {
173173 }
174174};
175175
176- /* *
177- * All of the data a system event needs
178- */
179- struct CreateEventData {
180- ManifestUid manifestUid; // The Manifest which generated the event
181- CollectionMetaData metaData; // The data of the new collection
182- };
183-
184- struct DropEventData {
185- ManifestUid manifestUid; // The Manifest which generated the event
186- ScopeID sid; // The scope that the collection belonged to
187- CollectionID cid; // The collection the event belongs to
188- };
189-
190- struct CreateScopeEventData {
191- ManifestUid manifestUid; // The Manifest which generated the event
192- ScopeMetaData metaData; // The data of the new scope
193- };
194-
195- struct DropScopeEventData {
196- ManifestUid manifestUid; // The Manifest which generated the event
197- ScopeID sid; // The scope the event belongs to
198- };
199-
200- std::string to_string (const CreateEventData& event);
201- std::string to_string (const DropEventData& event);
202- std::string to_string (const CreateScopeEventData& event);
203- std::string to_string (const DropScopeEventData& event);
204-
205- /* *
206- * All of the data a DCP create event message will transmit in the value of the
207- * message. This is the layout to be used on the wire and is in the correct
208- * byte order
209- */
210- struct CreateEventDcpData {
211- explicit CreateEventDcpData (const CreateEventData& ev)
212- : manifestUid(ev.manifestUid),
213- sid(ev.metaData.sid),
214- cid(ev.metaData.cid) {
215- }
216- // / The manifest uid stored in network byte order ready for sending
217- ManifestUidNetworkOrder manifestUid;
218- // / The scope id stored in network byte order ready for sending
219- ScopeIDNetworkOrder sid;
220- // / The collection id stored in network byte order ready for sending
221- CollectionIDNetworkOrder cid;
222- // The size is sizeof(manifestUid) + sizeof(cid) + sizeof(sid)
223- // (msvc won't allow that expression)
224- constexpr static size_t size{16 };
225- };
226-
227- /* *
228- * All of the data a DCP create event message will transmit in the value of a
229- * DCP system event message (when the collection is created with a TTL). This is
230- * the layout to be used on the wire and is in the correct byte order
231- */
232- struct CreateWithMaxTtlEventDcpData {
233- explicit CreateWithMaxTtlEventDcpData (const CreateEventData& ev)
234- : manifestUid(ev.manifestUid),
235- sid(ev.metaData.sid),
236- cid(ev.metaData.cid),
237- maxTtl(htonl(gsl::narrow_cast<uint32_t >(
238- ev.metaData.maxTtl.value().count()))) {
239- }
240- // / The manifest uid stored in network byte order ready for sending
241- ManifestUidNetworkOrder manifestUid;
242- // / The scope id stored in network byte order ready for sending
243- ScopeIDNetworkOrder sid;
244- // / The collection id stored in network byte order ready for sending
245- CollectionIDNetworkOrder cid;
246- // / The collection's maxTTL value (in network byte order)
247- uint32_t maxTtl;
248- // The size is sizeof(manifestUid) + sizeof(cid) + sizeof(sid) +
249- // sizeof(maxTTL) (msvc won't allow that expression)
250- constexpr static size_t size{20 };
251- };
252-
253- /* *
254- * All of the data a DCP drop event message will transmit in the value of the
255- * message. This is the layout to be used on the wire and is in the correct
256- * byte order
257- */
258- struct DropEventDcpData {
259- explicit DropEventDcpData (const DropEventData& data)
260- : manifestUid(data.manifestUid), sid(data.sid), cid(data.cid) {
261- }
262-
263- // / The manifest uid stored in network byte order ready for sending
264- ManifestUidNetworkOrder manifestUid;
265- // / The scope id stored in network byte order ready for sending
266- ScopeIDNetworkOrder sid;
267- // / The collection id stored in network byte order ready for sending
268- CollectionIDNetworkOrder cid;
269- // The size is sizeof(manifestUid) + sizeof(cid) (msvc won't allow that
270- // expression)
271- constexpr static size_t size{16 };
272- };
273-
274- /* *
275- * All of the data a DCP create scope event message will transmit in the value
276- * of the message. This is the layout to be used on the wire and is in the
277- * correct byte order
278- */
279- struct CreateScopeEventDcpData {
280- explicit CreateScopeEventDcpData (const CreateScopeEventData& data)
281- : manifestUid(data.manifestUid), sid(data.metaData.sid) {
282- }
283- // / The manifest uid stored in network byte order ready for sending
284- ManifestUidNetworkOrder manifestUid;
285- // / The scope id stored in network byte order ready for sending
286- ScopeIDNetworkOrder sid;
287- constexpr static size_t size{12 };
288- };
289-
290- /* *
291- * All of the data a DCP drop scope event message will transmit in the value of
292- * the message. This is the layout to be used on the wire and is in the correct
293- * byte order
294- */
295- struct DropScopeEventDcpData {
296- explicit DropScopeEventDcpData (const DropScopeEventData& data)
297- : manifestUid(data.manifestUid), sid(data.sid) {
298- }
299-
300- // / The manifest uid stored in network byte order ready for sending
301- ManifestUidNetworkOrder manifestUid;
302- // / The collection id stored in network byte order ready for sending
303- ScopeIDNetworkOrder sid;
304- constexpr static size_t size{12 };
305- };
306-
307176/* *
308177 * For creation of collection SystemEvents - The SystemEventFactory
309178 * glues the CollectionID into the event key (so create of x doesn't
0 commit comments