longleaf 0.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +94 -0
- data/.editorconfig +13 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +44 -0
- data/.rubocop_todo.yml +834 -0
- data/.yardopts +1 -0
- data/Gemfile +16 -1
- data/README.md +98 -12
- data/Rakefile +6 -0
- data/bin/setup +16 -1
- data/docs/aboutlongleaf.md +28 -0
- data/docs/extra.css +32 -0
- data/docs/img/change-file.png +0 -0
- data/docs/img/ll-example-preserved.png +0 -0
- data/docs/index.md +19 -0
- data/docs/install.md +66 -0
- data/docs/ll-example/config-example-relative.yml +33 -0
- data/docs/ll-example/files-dir/LLexample-PDF.pdf +0 -0
- data/docs/ll-example/files-dir/LLexample-TOCHANGE.txt +15 -0
- data/docs/ll-example/files-dir/LLexample-tokeep.txt +10 -0
- data/docs/ll-example/metadata-dir/.gitkeep +0 -0
- data/docs/ll-example/replica-files/.gitkeep +0 -0
- data/docs/ll-example/replica-metadata/.gitkeep +0 -0
- data/docs/quickstart.md +270 -0
- data/docs/rdocs/Longleaf.html +135 -0
- data/docs/rdocs/Longleaf/AppFields.html +178 -0
- data/docs/rdocs/Longleaf/ApplicationConfigDeserializer.html +631 -0
- data/docs/rdocs/Longleaf/ApplicationConfigManager.html +610 -0
- data/docs/rdocs/Longleaf/ApplicationConfigValidator.html +238 -0
- data/docs/rdocs/Longleaf/CLI.html +909 -0
- data/docs/rdocs/Longleaf/ChecksumMismatchError.html +151 -0
- data/docs/rdocs/Longleaf/ConfigBuilder.html +1339 -0
- data/docs/rdocs/Longleaf/ConfigurationError.html +143 -0
- data/docs/rdocs/Longleaf/ConfigurationValidator.html +227 -0
- data/docs/rdocs/Longleaf/DeregisterCommand.html +420 -0
- data/docs/rdocs/Longleaf/DeregisterEvent.html +453 -0
- data/docs/rdocs/Longleaf/DeregistrationError.html +151 -0
- data/docs/rdocs/Longleaf/DigestHelper.html +419 -0
- data/docs/rdocs/Longleaf/EventError.html +147 -0
- data/docs/rdocs/Longleaf/EventNames.html +163 -0
- data/docs/rdocs/Longleaf/EventStatusTracking.html +656 -0
- data/docs/rdocs/Longleaf/FileCheckService.html +540 -0
- data/docs/rdocs/Longleaf/FileHelpers.html +520 -0
- data/docs/rdocs/Longleaf/FileRecord.html +716 -0
- data/docs/rdocs/Longleaf/FileSelector.html +901 -0
- data/docs/rdocs/Longleaf/FixityCheckService.html +691 -0
- data/docs/rdocs/Longleaf/IndexManager.html +1155 -0
- data/docs/rdocs/Longleaf/InvalidDigestAlgorithmError.html +143 -0
- data/docs/rdocs/Longleaf/InvalidStoragePathError.html +143 -0
- data/docs/rdocs/Longleaf/Logging.html +405 -0
- data/docs/rdocs/Longleaf/Logging/RedirectingLogger.html +1213 -0
- data/docs/rdocs/Longleaf/LongleafError.html +139 -0
- data/docs/rdocs/Longleaf/MDFields.html +193 -0
- data/docs/rdocs/Longleaf/MetadataBuilder.html +787 -0
- data/docs/rdocs/Longleaf/MetadataDeserializer.html +537 -0
- data/docs/rdocs/Longleaf/MetadataError.html +143 -0
- data/docs/rdocs/Longleaf/MetadataPersistenceManager.html +539 -0
- data/docs/rdocs/Longleaf/MetadataRecord.html +1411 -0
- data/docs/rdocs/Longleaf/MetadataSerializer.html +786 -0
- data/docs/rdocs/Longleaf/PreservationServiceError.html +147 -0
- data/docs/rdocs/Longleaf/PreserveCommand.html +410 -0
- data/docs/rdocs/Longleaf/PreserveEvent.html +491 -0
- data/docs/rdocs/Longleaf/RegisterCommand.html +428 -0
- data/docs/rdocs/Longleaf/RegisterEvent.html +628 -0
- data/docs/rdocs/Longleaf/RegisteredFileSelector.html +446 -0
- data/docs/rdocs/Longleaf/RegistrationError.html +151 -0
- data/docs/rdocs/Longleaf/ReindexCommand.html +576 -0
- data/docs/rdocs/Longleaf/RsyncReplicationService.html +1180 -0
- data/docs/rdocs/Longleaf/SequelIndexDriver.html +1978 -0
- data/docs/rdocs/Longleaf/ServiceCandidateFilesystemIterator.html +572 -0
- data/docs/rdocs/Longleaf/ServiceCandidateIndexIterator.html +532 -0
- data/docs/rdocs/Longleaf/ServiceCandidateLocator.html +333 -0
- data/docs/rdocs/Longleaf/ServiceClassCache.html +725 -0
- data/docs/rdocs/Longleaf/ServiceDateHelper.html +425 -0
- data/docs/rdocs/Longleaf/ServiceDefinition.html +683 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionManager.html +371 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionValidator.html +269 -0
- data/docs/rdocs/Longleaf/ServiceFields.html +173 -0
- data/docs/rdocs/Longleaf/ServiceManager.html +1229 -0
- data/docs/rdocs/Longleaf/ServiceMappingManager.html +410 -0
- data/docs/rdocs/Longleaf/ServiceMappingValidator.html +347 -0
- data/docs/rdocs/Longleaf/ServiceRecord.html +821 -0
- data/docs/rdocs/Longleaf/StorageLocation.html +985 -0
- data/docs/rdocs/Longleaf/StorageLocationManager.html +729 -0
- data/docs/rdocs/Longleaf/StorageLocationUnavailableError.html +143 -0
- data/docs/rdocs/Longleaf/StorageLocationValidator.html +373 -0
- data/docs/rdocs/Longleaf/StoragePathValidator.html +253 -0
- data/docs/rdocs/Longleaf/SystemConfigBuilder.html +441 -0
- data/docs/rdocs/Longleaf/SystemConfigFields.html +163 -0
- data/docs/rdocs/Longleaf/ValidateConfigCommand.html +451 -0
- data/docs/rdocs/Longleaf/ValidateMetadataCommand.html +408 -0
- data/docs/rdocs/_index.html +660 -0
- data/docs/rdocs/class_list.html +51 -0
- data/docs/rdocs/css/common.css +1 -0
- data/docs/rdocs/css/full_list.css +58 -0
- data/docs/rdocs/css/style.css +496 -0
- data/docs/rdocs/file.README.html +165 -0
- data/docs/rdocs/file_list.html +56 -0
- data/docs/rdocs/frames.html +17 -0
- data/docs/rdocs/index.html +165 -0
- data/docs/rdocs/js/app.js +303 -0
- data/docs/rdocs/js/full_list.js +216 -0
- data/docs/rdocs/js/jquery.js +4 -0
- data/docs/rdocs/method_list.html +2051 -0
- data/docs/rdocs/top-level-namespace.html +110 -0
- data/lib/longleaf/candidates/file_selector.rb +150 -0
- data/lib/longleaf/candidates/manifest_digest_provider.rb +17 -0
- data/lib/longleaf/candidates/physical_path_provider.rb +17 -0
- data/lib/longleaf/candidates/registered_file_selector.rb +67 -0
- data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +93 -0
- data/lib/longleaf/candidates/service_candidate_index_iterator.rb +84 -0
- data/lib/longleaf/candidates/service_candidate_locator.rb +23 -0
- data/lib/longleaf/candidates/single_digest_provider.rb +13 -0
- data/lib/longleaf/cli.rb +252 -46
- data/lib/longleaf/commands/deregister_command.rb +51 -0
- data/lib/longleaf/commands/preserve_command.rb +50 -0
- data/lib/longleaf/commands/register_command.rb +34 -43
- data/lib/longleaf/commands/reindex_command.rb +92 -0
- data/lib/longleaf/commands/validate_config_command.rb +33 -8
- data/lib/longleaf/commands/validate_metadata_command.rb +51 -0
- data/lib/longleaf/errors.rb +26 -7
- data/lib/longleaf/events/deregister_event.rb +53 -0
- data/lib/longleaf/events/event_names.rb +9 -0
- data/lib/longleaf/events/event_status_tracking.rb +59 -0
- data/lib/longleaf/events/preserve_event.rb +82 -0
- data/lib/longleaf/events/register_event.rb +59 -51
- data/lib/longleaf/helpers/case_insensitive_hash.rb +38 -0
- data/lib/longleaf/helpers/digest_helper.rb +56 -0
- data/lib/longleaf/helpers/s3_uri_helper.rb +86 -0
- data/lib/longleaf/helpers/selection_options_parser.rb +215 -0
- data/lib/longleaf/helpers/service_date_helper.rb +78 -0
- data/lib/longleaf/indexing/index_manager.rb +101 -0
- data/lib/longleaf/indexing/sequel_index_driver.rb +306 -0
- data/lib/longleaf/logging.rb +5 -4
- data/lib/longleaf/logging/redirecting_logger.rb +30 -25
- data/lib/longleaf/models/app_fields.rb +7 -2
- data/lib/longleaf/models/file_record.rb +31 -8
- data/lib/longleaf/models/filesystem_metadata_location.rb +56 -0
- data/lib/longleaf/models/filesystem_storage_location.rb +52 -0
- data/lib/longleaf/models/md_fields.rb +3 -1
- data/lib/longleaf/models/metadata_location.rb +47 -0
- data/lib/longleaf/models/metadata_record.rb +43 -16
- data/lib/longleaf/models/s3_storage_location.rb +138 -0
- data/lib/longleaf/models/service_definition.rb +7 -6
- data/lib/longleaf/models/service_fields.rb +7 -1
- data/lib/longleaf/models/service_record.rb +10 -6
- data/lib/longleaf/models/storage_location.rb +24 -19
- data/lib/longleaf/models/storage_types.rb +9 -0
- data/lib/longleaf/models/system_config_fields.rb +9 -0
- data/lib/longleaf/preservation_services/file_check_service.rb +59 -0
- data/lib/longleaf/preservation_services/fixity_check_service.rb +124 -0
- data/lib/longleaf/preservation_services/rsync_replication_service.rb +198 -0
- data/lib/longleaf/preservation_services/s3_replication_service.rb +131 -0
- data/lib/longleaf/services/application_config_deserializer.rb +81 -24
- data/lib/longleaf/services/application_config_manager.rb +20 -6
- data/lib/longleaf/services/application_config_validator.rb +19 -9
- data/lib/longleaf/services/configuration_validator.rb +67 -4
- data/lib/longleaf/services/filesystem_location_validator.rb +16 -0
- data/lib/longleaf/services/metadata_deserializer.rb +115 -42
- data/lib/longleaf/services/metadata_persistence_manager.rb +47 -0
- data/lib/longleaf/services/metadata_serializer.rb +156 -23
- data/lib/longleaf/services/metadata_validator.rb +76 -0
- data/lib/longleaf/services/s3_location_validator.rb +19 -0
- data/lib/longleaf/services/service_class_cache.rb +112 -0
- data/lib/longleaf/services/service_definition_manager.rb +10 -7
- data/lib/longleaf/services/service_definition_validator.rb +25 -18
- data/lib/longleaf/services/service_manager.rb +86 -11
- data/lib/longleaf/services/service_mapping_manager.rb +13 -12
- data/lib/longleaf/services/service_mapping_validator.rb +36 -26
- data/lib/longleaf/services/storage_location_manager.rb +76 -15
- data/lib/longleaf/services/storage_location_validator.rb +49 -35
- data/lib/longleaf/specs/config_builder.rb +47 -23
- data/lib/longleaf/specs/config_validator_helpers.rb +16 -0
- data/lib/longleaf/specs/custom_matchers.rb +9 -0
- data/lib/longleaf/specs/file_helpers.rb +61 -0
- data/lib/longleaf/specs/metadata_builder.rb +98 -0
- data/lib/longleaf/specs/system_config_builder.rb +27 -0
- data/lib/longleaf/version.rb +1 -1
- data/longleaf.gemspec +20 -7
- data/mkdocs.yml +21 -0
- metadata +308 -24
- data/.travis.yml +0 -4
- data/lib/longleaf/commands/abstract_command.rb +0 -37
- data/lib/longleaf/services/storage_path_validator.rb +0 -16
@@ -0,0 +1,1411 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Longleaf::MetadataRecord
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.19
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Longleaf::MetadataRecord";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (M)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">MetadataRecord</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Longleaf::MetadataRecord
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Longleaf::MetadataRecord</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/longleaf/models/metadata_record.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Metadata record for a single file</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#checksums-instance_method" title="#checksums (instance method)">#<strong>checksums</strong> ⇒ Object </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute checksums.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#deregistered-instance_method" title="#deregistered (instance method)">#<strong>deregistered</strong> ⇒ Object </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Returns the value of attribute deregistered.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#file_size-instance_method" title="#file_size (instance method)">#<strong>file_size</strong> ⇒ Object </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="summary_desc"><div class='inline'>
|
197
|
+
<p>Returns the value of attribute file_size.</p>
|
198
|
+
</div></span>
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
|
203
|
+
<li class="public ">
|
204
|
+
<span class="summary_signature">
|
205
|
+
|
206
|
+
<a href="#last_modified-instance_method" title="#last_modified (instance method)">#<strong>last_modified</strong> ⇒ Object </a>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
</span>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<span class="summary_desc"><div class='inline'>
|
224
|
+
<p>Returns the value of attribute last_modified.</p>
|
225
|
+
</div></span>
|
226
|
+
|
227
|
+
</li>
|
228
|
+
|
229
|
+
|
230
|
+
<li class="public ">
|
231
|
+
<span class="summary_signature">
|
232
|
+
|
233
|
+
<a href="#properties-instance_method" title="#properties (instance method)">#<strong>properties</strong> ⇒ Object </a>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
</span>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
<span class="note title readonly">readonly</span>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="summary_desc"><div class='inline'>
|
253
|
+
<p>Returns the value of attribute properties.</p>
|
254
|
+
</div></span>
|
255
|
+
|
256
|
+
</li>
|
257
|
+
|
258
|
+
|
259
|
+
<li class="public ">
|
260
|
+
<span class="summary_signature">
|
261
|
+
|
262
|
+
<a href="#registered-instance_method" title="#registered (instance method)">#<strong>registered</strong> ⇒ Object </a>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</span>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<span class="note title readonly">readonly</span>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
<span class="summary_desc"><div class='inline'>
|
282
|
+
<p>Returns the value of attribute registered.</p>
|
283
|
+
</div></span>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<h2>
|
295
|
+
Instance Method Summary
|
296
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
297
|
+
</h2>
|
298
|
+
|
299
|
+
<ul class="summary">
|
300
|
+
|
301
|
+
<li class="public ">
|
302
|
+
<span class="summary_signature">
|
303
|
+
|
304
|
+
<a href="#add_service-instance_method" title="#add_service (instance method)">#<strong>add_service</strong>(name, service = ServiceRecord.new) ⇒ ServiceRecord </a>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
</span>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
<span class="summary_desc"><div class='inline'>
|
319
|
+
<p>Adds a service to this record.</p>
|
320
|
+
</div></span>
|
321
|
+
|
322
|
+
</li>
|
323
|
+
|
324
|
+
|
325
|
+
<li class="public ">
|
326
|
+
<span class="summary_signature">
|
327
|
+
|
328
|
+
<a href="#deregistered%3F-instance_method" title="#deregistered? (instance method)">#<strong>deregistered?</strong> ⇒ Boolean </a>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
</span>
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
<span class="summary_desc"><div class='inline'>
|
343
|
+
<p>True if the record is deregistered.</p>
|
344
|
+
</div></span>
|
345
|
+
|
346
|
+
</li>
|
347
|
+
|
348
|
+
|
349
|
+
<li class="public ">
|
350
|
+
<span class="summary_signature">
|
351
|
+
|
352
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(properties: nil, services: nil, deregistered: nil, registered: nil, checksums: nil, file_size: nil, last_modified: nil) ⇒ MetadataRecord </a>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
</span>
|
357
|
+
|
358
|
+
|
359
|
+
<span class="note title constructor">constructor</span>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
<span class="summary_desc"><div class='inline'>
|
369
|
+
<p>A new instance of MetadataRecord.</p>
|
370
|
+
</div></span>
|
371
|
+
|
372
|
+
</li>
|
373
|
+
|
374
|
+
|
375
|
+
<li class="public ">
|
376
|
+
<span class="summary_signature">
|
377
|
+
|
378
|
+
<a href="#list_services-instance_method" title="#list_services (instance method)">#<strong>list_services</strong> ⇒ Array<String> </a>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
</span>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
<span class="summary_desc"><div class='inline'>
|
393
|
+
<p>A list of name identifiers for services registered to this record.</p>
|
394
|
+
</div></span>
|
395
|
+
|
396
|
+
</li>
|
397
|
+
|
398
|
+
|
399
|
+
<li class="public ">
|
400
|
+
<span class="summary_signature">
|
401
|
+
|
402
|
+
<a href="#service-instance_method" title="#service (instance method)">#<strong>service</strong>(name) ⇒ ServiceRecord </a>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
</span>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
<span class="summary_desc"><div class='inline'>
|
417
|
+
<p>The ServiceRecord for the service identified by name, or nil.</p>
|
418
|
+
</div></span>
|
419
|
+
|
420
|
+
</li>
|
421
|
+
|
422
|
+
|
423
|
+
<li class="public ">
|
424
|
+
<span class="summary_signature">
|
425
|
+
|
426
|
+
<a href="#update_service_as_failed-instance_method" title="#update_service_as_failed (instance method)">#<strong>update_service_as_failed</strong>(service_name) ⇒ ServiceRecord </a>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
</span>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
<span class="summary_desc"><div class='inline'>
|
441
|
+
<p>Updates details of service record as if the service had encountered a failure during execution.</p>
|
442
|
+
</div></span>
|
443
|
+
|
444
|
+
</li>
|
445
|
+
|
446
|
+
|
447
|
+
<li class="public ">
|
448
|
+
<span class="summary_signature">
|
449
|
+
|
450
|
+
<a href="#update_service_as_performed-instance_method" title="#update_service_as_performed (instance method)">#<strong>update_service_as_performed</strong>(service_name) ⇒ ServiceRecord </a>
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
</span>
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
<span class="summary_desc"><div class='inline'>
|
465
|
+
<p>Updates details of service record as if the service had been executed.</p>
|
466
|
+
</div></span>
|
467
|
+
|
468
|
+
</li>
|
469
|
+
|
470
|
+
|
471
|
+
</ul>
|
472
|
+
|
473
|
+
|
474
|
+
<div id="constructor_details" class="method_details_list">
|
475
|
+
<h2>Constructor Details</h2>
|
476
|
+
|
477
|
+
<div class="method_details first">
|
478
|
+
<h3 class="signature first" id="initialize-instance_method">
|
479
|
+
|
480
|
+
#<strong>initialize</strong>(properties: nil, services: nil, deregistered: nil, registered: nil, checksums: nil, file_size: nil, last_modified: nil) ⇒ <tt><span class='object_link'><a href="" title="Longleaf::MetadataRecord (class)">MetadataRecord</a></span></tt>
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
</h3><div class="docstring">
|
487
|
+
<div class="discussion">
|
488
|
+
|
489
|
+
<p>Returns a new instance of MetadataRecord</p>
|
490
|
+
|
491
|
+
|
492
|
+
</div>
|
493
|
+
</div>
|
494
|
+
<div class="tags">
|
495
|
+
<p class="tag_title">Parameters:</p>
|
496
|
+
<ul class="param">
|
497
|
+
|
498
|
+
<li>
|
499
|
+
|
500
|
+
<span class='name'>properties</span>
|
501
|
+
|
502
|
+
|
503
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
—
|
508
|
+
<div class='inline'>
|
509
|
+
<p>initial data properties for this record</p>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
</li>
|
513
|
+
|
514
|
+
<li>
|
515
|
+
|
516
|
+
<span class='name'>services</span>
|
517
|
+
|
518
|
+
|
519
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
—
|
524
|
+
<div class='inline'>
|
525
|
+
<p>initial service property tree</p>
|
526
|
+
</div>
|
527
|
+
|
528
|
+
</li>
|
529
|
+
|
530
|
+
<li>
|
531
|
+
|
532
|
+
<span class='name'>deregistered</span>
|
533
|
+
|
534
|
+
|
535
|
+
<span class='type'>(<tt>String</tt>)</span>
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
—
|
540
|
+
<div class='inline'>
|
541
|
+
<p>deregistered timestamp</p>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
</li>
|
545
|
+
|
546
|
+
<li>
|
547
|
+
|
548
|
+
<span class='name'>registered</span>
|
549
|
+
|
550
|
+
|
551
|
+
<span class='type'>(<tt>String</tt>)</span>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
—
|
556
|
+
<div class='inline'>
|
557
|
+
<p>registered timestamp</p>
|
558
|
+
</div>
|
559
|
+
|
560
|
+
</li>
|
561
|
+
|
562
|
+
<li>
|
563
|
+
|
564
|
+
<span class='name'>checksums</span>
|
565
|
+
|
566
|
+
|
567
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
—
|
572
|
+
<div class='inline'>
|
573
|
+
<p>hash of checksum values</p>
|
574
|
+
</div>
|
575
|
+
|
576
|
+
</li>
|
577
|
+
|
578
|
+
<li>
|
579
|
+
|
580
|
+
<span class='name'>file_size</span>
|
581
|
+
|
582
|
+
|
583
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
—
|
588
|
+
<div class='inline'>
|
589
|
+
<p>size of file in bytes</p>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
</li>
|
593
|
+
|
594
|
+
<li>
|
595
|
+
|
596
|
+
<span class='name'>last_modified</span>
|
597
|
+
|
598
|
+
|
599
|
+
<span class='type'>(<tt>String</tt>)</span>
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
—
|
604
|
+
<div class='inline'>
|
605
|
+
<p>iso8601 representation of the last modified date of file</p>
|
606
|
+
</div>
|
607
|
+
|
608
|
+
</li>
|
609
|
+
|
610
|
+
</ul>
|
611
|
+
|
612
|
+
|
613
|
+
</div><table class="source_code">
|
614
|
+
<tr>
|
615
|
+
<td>
|
616
|
+
<pre class="lines">
|
617
|
+
|
618
|
+
|
619
|
+
20
|
620
|
+
21
|
621
|
+
22
|
622
|
+
23
|
623
|
+
24
|
624
|
+
25
|
625
|
+
26
|
626
|
+
27
|
627
|
+
28
|
628
|
+
29</pre>
|
629
|
+
</td>
|
630
|
+
<td>
|
631
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 20</span>
|
632
|
+
|
633
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>properties:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>services:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>deregistered:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>registered:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>checksums:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
634
|
+
<span class='label'>file_size:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>last_modified:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
635
|
+
<span class='ivar'>@properties</span> <span class='op'>=</span> <span class='id identifier rubyid_properties'>properties</span> <span class='op'>||</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
636
|
+
<span class='ivar'>@registered</span> <span class='op'>=</span> <span class='id identifier rubyid_registered'>registered</span>
|
637
|
+
<span class='ivar'>@deregistered</span> <span class='op'>=</span> <span class='id identifier rubyid_deregistered'>deregistered</span>
|
638
|
+
<span class='ivar'>@checksums</span> <span class='op'>=</span> <span class='id identifier rubyid_checksums'>checksums</span> <span class='op'>||</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
639
|
+
<span class='ivar'>@services</span> <span class='op'>=</span> <span class='id identifier rubyid_services'>services</span> <span class='op'>||</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
640
|
+
<span class='ivar'>@file_size</span> <span class='op'>=</span> <span class='id identifier rubyid_file_size'>file_size</span>
|
641
|
+
<span class='ivar'>@last_modified</span> <span class='op'>=</span> <span class='id identifier rubyid_last_modified'>last_modified</span>
|
642
|
+
<span class='kw'>end</span></pre>
|
643
|
+
</td>
|
644
|
+
</tr>
|
645
|
+
</table>
|
646
|
+
</div>
|
647
|
+
|
648
|
+
</div>
|
649
|
+
|
650
|
+
<div id="instance_attr_details" class="attr_details">
|
651
|
+
<h2>Instance Attribute Details</h2>
|
652
|
+
|
653
|
+
|
654
|
+
<span id=""></span>
|
655
|
+
<div class="method_details first">
|
656
|
+
<h3 class="signature first" id="checksums-instance_method">
|
657
|
+
|
658
|
+
#<strong>checksums</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
</h3><div class="docstring">
|
665
|
+
<div class="discussion">
|
666
|
+
|
667
|
+
<p>Returns the value of attribute checksums</p>
|
668
|
+
|
669
|
+
|
670
|
+
</div>
|
671
|
+
</div>
|
672
|
+
<div class="tags">
|
673
|
+
|
674
|
+
|
675
|
+
</div><table class="source_code">
|
676
|
+
<tr>
|
677
|
+
<td>
|
678
|
+
<pre class="lines">
|
679
|
+
|
680
|
+
|
681
|
+
9
|
682
|
+
10
|
683
|
+
11</pre>
|
684
|
+
</td>
|
685
|
+
<td>
|
686
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 9</span>
|
687
|
+
|
688
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_checksums'>checksums</span>
|
689
|
+
<span class='ivar'>@checksums</span>
|
690
|
+
<span class='kw'>end</span></pre>
|
691
|
+
</td>
|
692
|
+
</tr>
|
693
|
+
</table>
|
694
|
+
</div>
|
695
|
+
|
696
|
+
|
697
|
+
<span id="deregistered=-instance_method"></span>
|
698
|
+
<div class="method_details ">
|
699
|
+
<h3 class="signature " id="deregistered-instance_method">
|
700
|
+
|
701
|
+
#<strong>deregistered</strong> ⇒ <tt>Object</tt>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
</h3><div class="docstring">
|
708
|
+
<div class="discussion">
|
709
|
+
|
710
|
+
<p>Returns the value of attribute deregistered</p>
|
711
|
+
|
712
|
+
|
713
|
+
</div>
|
714
|
+
</div>
|
715
|
+
<div class="tags">
|
716
|
+
|
717
|
+
|
718
|
+
</div><table class="source_code">
|
719
|
+
<tr>
|
720
|
+
<td>
|
721
|
+
<pre class="lines">
|
722
|
+
|
723
|
+
|
724
|
+
8
|
725
|
+
9
|
726
|
+
10</pre>
|
727
|
+
</td>
|
728
|
+
<td>
|
729
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 8</span>
|
730
|
+
|
731
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_deregistered'>deregistered</span>
|
732
|
+
<span class='ivar'>@deregistered</span>
|
733
|
+
<span class='kw'>end</span></pre>
|
734
|
+
</td>
|
735
|
+
</tr>
|
736
|
+
</table>
|
737
|
+
</div>
|
738
|
+
|
739
|
+
|
740
|
+
<span id="file_size=-instance_method"></span>
|
741
|
+
<div class="method_details ">
|
742
|
+
<h3 class="signature " id="file_size-instance_method">
|
743
|
+
|
744
|
+
#<strong>file_size</strong> ⇒ <tt>Object</tt>
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
</h3><div class="docstring">
|
751
|
+
<div class="discussion">
|
752
|
+
|
753
|
+
<p>Returns the value of attribute file_size</p>
|
754
|
+
|
755
|
+
|
756
|
+
</div>
|
757
|
+
</div>
|
758
|
+
<div class="tags">
|
759
|
+
|
760
|
+
|
761
|
+
</div><table class="source_code">
|
762
|
+
<tr>
|
763
|
+
<td>
|
764
|
+
<pre class="lines">
|
765
|
+
|
766
|
+
|
767
|
+
11
|
768
|
+
12
|
769
|
+
13</pre>
|
770
|
+
</td>
|
771
|
+
<td>
|
772
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 11</span>
|
773
|
+
|
774
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_file_size'>file_size</span>
|
775
|
+
<span class='ivar'>@file_size</span>
|
776
|
+
<span class='kw'>end</span></pre>
|
777
|
+
</td>
|
778
|
+
</tr>
|
779
|
+
</table>
|
780
|
+
</div>
|
781
|
+
|
782
|
+
|
783
|
+
<span id="last_modified=-instance_method"></span>
|
784
|
+
<div class="method_details ">
|
785
|
+
<h3 class="signature " id="last_modified-instance_method">
|
786
|
+
|
787
|
+
#<strong>last_modified</strong> ⇒ <tt>Object</tt>
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
|
793
|
+
</h3><div class="docstring">
|
794
|
+
<div class="discussion">
|
795
|
+
|
796
|
+
<p>Returns the value of attribute last_modified</p>
|
797
|
+
|
798
|
+
|
799
|
+
</div>
|
800
|
+
</div>
|
801
|
+
<div class="tags">
|
802
|
+
|
803
|
+
|
804
|
+
</div><table class="source_code">
|
805
|
+
<tr>
|
806
|
+
<td>
|
807
|
+
<pre class="lines">
|
808
|
+
|
809
|
+
|
810
|
+
11
|
811
|
+
12
|
812
|
+
13</pre>
|
813
|
+
</td>
|
814
|
+
<td>
|
815
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 11</span>
|
816
|
+
|
817
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_last_modified'>last_modified</span>
|
818
|
+
<span class='ivar'>@last_modified</span>
|
819
|
+
<span class='kw'>end</span></pre>
|
820
|
+
</td>
|
821
|
+
</tr>
|
822
|
+
</table>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
|
826
|
+
<span id=""></span>
|
827
|
+
<div class="method_details ">
|
828
|
+
<h3 class="signature " id="properties-instance_method">
|
829
|
+
|
830
|
+
#<strong>properties</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
</h3><div class="docstring">
|
837
|
+
<div class="discussion">
|
838
|
+
|
839
|
+
<p>Returns the value of attribute properties</p>
|
840
|
+
|
841
|
+
|
842
|
+
</div>
|
843
|
+
</div>
|
844
|
+
<div class="tags">
|
845
|
+
|
846
|
+
|
847
|
+
</div><table class="source_code">
|
848
|
+
<tr>
|
849
|
+
<td>
|
850
|
+
<pre class="lines">
|
851
|
+
|
852
|
+
|
853
|
+
10
|
854
|
+
11
|
855
|
+
12</pre>
|
856
|
+
</td>
|
857
|
+
<td>
|
858
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 10</span>
|
859
|
+
|
860
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_properties'>properties</span>
|
861
|
+
<span class='ivar'>@properties</span>
|
862
|
+
<span class='kw'>end</span></pre>
|
863
|
+
</td>
|
864
|
+
</tr>
|
865
|
+
</table>
|
866
|
+
</div>
|
867
|
+
|
868
|
+
|
869
|
+
<span id=""></span>
|
870
|
+
<div class="method_details ">
|
871
|
+
<h3 class="signature " id="registered-instance_method">
|
872
|
+
|
873
|
+
#<strong>registered</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
</h3><div class="docstring">
|
880
|
+
<div class="discussion">
|
881
|
+
|
882
|
+
<p>Returns the value of attribute registered</p>
|
883
|
+
|
884
|
+
|
885
|
+
</div>
|
886
|
+
</div>
|
887
|
+
<div class="tags">
|
888
|
+
|
889
|
+
|
890
|
+
</div><table class="source_code">
|
891
|
+
<tr>
|
892
|
+
<td>
|
893
|
+
<pre class="lines">
|
894
|
+
|
895
|
+
|
896
|
+
7
|
897
|
+
8
|
898
|
+
9</pre>
|
899
|
+
</td>
|
900
|
+
<td>
|
901
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 7</span>
|
902
|
+
|
903
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_registered'>registered</span>
|
904
|
+
<span class='ivar'>@registered</span>
|
905
|
+
<span class='kw'>end</span></pre>
|
906
|
+
</td>
|
907
|
+
</tr>
|
908
|
+
</table>
|
909
|
+
</div>
|
910
|
+
|
911
|
+
</div>
|
912
|
+
|
913
|
+
|
914
|
+
<div id="instance_method_details" class="method_details_list">
|
915
|
+
<h2>Instance Method Details</h2>
|
916
|
+
|
917
|
+
|
918
|
+
<div class="method_details first">
|
919
|
+
<h3 class="signature first" id="add_service-instance_method">
|
920
|
+
|
921
|
+
#<strong>add_service</strong>(name, service = ServiceRecord.new) ⇒ <tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>
|
922
|
+
|
923
|
+
|
924
|
+
|
925
|
+
|
926
|
+
|
927
|
+
</h3><div class="docstring">
|
928
|
+
<div class="discussion">
|
929
|
+
|
930
|
+
<p>Adds a service to this record</p>
|
931
|
+
|
932
|
+
|
933
|
+
</div>
|
934
|
+
</div>
|
935
|
+
<div class="tags">
|
936
|
+
<p class="tag_title">Parameters:</p>
|
937
|
+
<ul class="param">
|
938
|
+
|
939
|
+
<li>
|
940
|
+
|
941
|
+
<span class='name'>name</span>
|
942
|
+
|
943
|
+
|
944
|
+
<span class='type'>(<tt>String</tt>)</span>
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
—
|
949
|
+
<div class='inline'>
|
950
|
+
<p>identifier for the service being added</p>
|
951
|
+
</div>
|
952
|
+
|
953
|
+
</li>
|
954
|
+
|
955
|
+
<li>
|
956
|
+
|
957
|
+
<span class='name'>service</span>
|
958
|
+
|
959
|
+
|
960
|
+
<span class='type'>(<tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>)</span>
|
961
|
+
|
962
|
+
|
963
|
+
<em class="default">(defaults to: <tt>ServiceRecord.new</tt>)</em>
|
964
|
+
|
965
|
+
|
966
|
+
—
|
967
|
+
<div class='inline'>
|
968
|
+
<p>properties for populating the new service</p>
|
969
|
+
</div>
|
970
|
+
|
971
|
+
</li>
|
972
|
+
|
973
|
+
</ul>
|
974
|
+
|
975
|
+
<p class="tag_title">Returns:</p>
|
976
|
+
<ul class="return">
|
977
|
+
|
978
|
+
<li>
|
979
|
+
|
980
|
+
|
981
|
+
<span class='type'>(<tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>)</span>
|
982
|
+
|
983
|
+
|
984
|
+
|
985
|
+
—
|
986
|
+
<div class='inline'>
|
987
|
+
<p>the service added</p>
|
988
|
+
</div>
|
989
|
+
|
990
|
+
</li>
|
991
|
+
|
992
|
+
</ul>
|
993
|
+
<p class="tag_title">Raises:</p>
|
994
|
+
<ul class="raise">
|
995
|
+
|
996
|
+
<li>
|
997
|
+
|
998
|
+
|
999
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
</li>
|
1004
|
+
|
1005
|
+
</ul>
|
1006
|
+
|
1007
|
+
</div><table class="source_code">
|
1008
|
+
<tr>
|
1009
|
+
<td>
|
1010
|
+
<pre class="lines">
|
1011
|
+
|
1012
|
+
|
1013
|
+
41
|
1014
|
+
42
|
1015
|
+
43
|
1016
|
+
44
|
1017
|
+
45
|
1018
|
+
46</pre>
|
1019
|
+
</td>
|
1020
|
+
<td>
|
1021
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 41</span>
|
1022
|
+
|
1023
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_service'>add_service</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ServiceRecord.html#initialize-instance_method" title="Longleaf::ServiceRecord#initialize (method)">new</a></span></span><span class='rparen'>)</span>
|
1024
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Value must be a ServiceRecord object when adding a service</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></span>
|
1025
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>IndexError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Service with name '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>' already exists</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@services</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1026
|
+
|
1027
|
+
<span class='ivar'>@services</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_service'>service</span>
|
1028
|
+
<span class='kw'>end</span></pre>
|
1029
|
+
</td>
|
1030
|
+
</tr>
|
1031
|
+
</table>
|
1032
|
+
</div>
|
1033
|
+
|
1034
|
+
<div class="method_details ">
|
1035
|
+
<h3 class="signature " id="deregistered?-instance_method">
|
1036
|
+
|
1037
|
+
#<strong>deregistered?</strong> ⇒ <tt>Boolean</tt>
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
</h3><div class="docstring">
|
1044
|
+
<div class="discussion">
|
1045
|
+
|
1046
|
+
<p>Returns true if the record is deregistered</p>
|
1047
|
+
|
1048
|
+
|
1049
|
+
</div>
|
1050
|
+
</div>
|
1051
|
+
<div class="tags">
|
1052
|
+
|
1053
|
+
<p class="tag_title">Returns:</p>
|
1054
|
+
<ul class="return">
|
1055
|
+
|
1056
|
+
<li>
|
1057
|
+
|
1058
|
+
|
1059
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
—
|
1064
|
+
<div class='inline'>
|
1065
|
+
<p>true if the record is deregistered</p>
|
1066
|
+
</div>
|
1067
|
+
|
1068
|
+
</li>
|
1069
|
+
|
1070
|
+
</ul>
|
1071
|
+
|
1072
|
+
</div><table class="source_code">
|
1073
|
+
<tr>
|
1074
|
+
<td>
|
1075
|
+
<pre class="lines">
|
1076
|
+
|
1077
|
+
|
1078
|
+
32
|
1079
|
+
33
|
1080
|
+
34</pre>
|
1081
|
+
</td>
|
1082
|
+
<td>
|
1083
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 32</span>
|
1084
|
+
|
1085
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_deregistered?'>deregistered?</span>
|
1086
|
+
<span class='op'>!</span><span class='ivar'>@deregistered</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1087
|
+
<span class='kw'>end</span></pre>
|
1088
|
+
</td>
|
1089
|
+
</tr>
|
1090
|
+
</table>
|
1091
|
+
</div>
|
1092
|
+
|
1093
|
+
<div class="method_details ">
|
1094
|
+
<h3 class="signature " id="list_services-instance_method">
|
1095
|
+
|
1096
|
+
#<strong>list_services</strong> ⇒ <tt>Array<String></tt>
|
1097
|
+
|
1098
|
+
|
1099
|
+
|
1100
|
+
|
1101
|
+
|
1102
|
+
</h3><div class="docstring">
|
1103
|
+
<div class="discussion">
|
1104
|
+
|
1105
|
+
<p>Returns a list of name identifiers for services registered to this record</p>
|
1106
|
+
|
1107
|
+
|
1108
|
+
</div>
|
1109
|
+
</div>
|
1110
|
+
<div class="tags">
|
1111
|
+
|
1112
|
+
<p class="tag_title">Returns:</p>
|
1113
|
+
<ul class="return">
|
1114
|
+
|
1115
|
+
<li>
|
1116
|
+
|
1117
|
+
|
1118
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
—
|
1123
|
+
<div class='inline'>
|
1124
|
+
<p>a list of name identifiers for services registered to this record</p>
|
1125
|
+
</div>
|
1126
|
+
|
1127
|
+
</li>
|
1128
|
+
|
1129
|
+
</ul>
|
1130
|
+
|
1131
|
+
</div><table class="source_code">
|
1132
|
+
<tr>
|
1133
|
+
<td>
|
1134
|
+
<pre class="lines">
|
1135
|
+
|
1136
|
+
|
1137
|
+
75
|
1138
|
+
76
|
1139
|
+
77</pre>
|
1140
|
+
</td>
|
1141
|
+
<td>
|
1142
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 75</span>
|
1143
|
+
|
1144
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_list_services'>list_services</span>
|
1145
|
+
<span class='ivar'>@services</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
1146
|
+
<span class='kw'>end</span></pre>
|
1147
|
+
</td>
|
1148
|
+
</tr>
|
1149
|
+
</table>
|
1150
|
+
</div>
|
1151
|
+
|
1152
|
+
<div class="method_details ">
|
1153
|
+
<h3 class="signature " id="service-instance_method">
|
1154
|
+
|
1155
|
+
#<strong>service</strong>(name) ⇒ <tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
</h3><div class="docstring">
|
1162
|
+
<div class="discussion">
|
1163
|
+
|
1164
|
+
<p>Returns the ServiceRecord for the service identified by name, or nil</p>
|
1165
|
+
|
1166
|
+
|
1167
|
+
</div>
|
1168
|
+
</div>
|
1169
|
+
<div class="tags">
|
1170
|
+
<p class="tag_title">Parameters:</p>
|
1171
|
+
<ul class="param">
|
1172
|
+
|
1173
|
+
<li>
|
1174
|
+
|
1175
|
+
<span class='name'>name</span>
|
1176
|
+
|
1177
|
+
|
1178
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1179
|
+
|
1180
|
+
|
1181
|
+
|
1182
|
+
—
|
1183
|
+
<div class='inline'>
|
1184
|
+
<p>name identifier of the service to retrieve</p>
|
1185
|
+
</div>
|
1186
|
+
|
1187
|
+
</li>
|
1188
|
+
|
1189
|
+
</ul>
|
1190
|
+
|
1191
|
+
<p class="tag_title">Returns:</p>
|
1192
|
+
<ul class="return">
|
1193
|
+
|
1194
|
+
<li>
|
1195
|
+
|
1196
|
+
|
1197
|
+
<span class='type'>(<tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>)</span>
|
1198
|
+
|
1199
|
+
|
1200
|
+
|
1201
|
+
—
|
1202
|
+
<div class='inline'>
|
1203
|
+
<p>the ServiceRecord for the service identified by name, or nil</p>
|
1204
|
+
</div>
|
1205
|
+
|
1206
|
+
</li>
|
1207
|
+
|
1208
|
+
</ul>
|
1209
|
+
|
1210
|
+
</div><table class="source_code">
|
1211
|
+
<tr>
|
1212
|
+
<td>
|
1213
|
+
<pre class="lines">
|
1214
|
+
|
1215
|
+
|
1216
|
+
70
|
1217
|
+
71
|
1218
|
+
72</pre>
|
1219
|
+
</td>
|
1220
|
+
<td>
|
1221
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 70</span>
|
1222
|
+
|
1223
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_service'>service</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1224
|
+
<span class='ivar'>@services</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
|
1225
|
+
<span class='kw'>end</span></pre>
|
1226
|
+
</td>
|
1227
|
+
</tr>
|
1228
|
+
</table>
|
1229
|
+
</div>
|
1230
|
+
|
1231
|
+
<div class="method_details ">
|
1232
|
+
<h3 class="signature " id="update_service_as_failed-instance_method">
|
1233
|
+
|
1234
|
+
#<strong>update_service_as_failed</strong>(service_name) ⇒ <tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>
|
1235
|
+
|
1236
|
+
|
1237
|
+
|
1238
|
+
|
1239
|
+
|
1240
|
+
</h3><div class="docstring">
|
1241
|
+
<div class="discussion">
|
1242
|
+
|
1243
|
+
<p>Updates details of service record as if the service had encountered a failure during execution.</p>
|
1244
|
+
|
1245
|
+
|
1246
|
+
</div>
|
1247
|
+
</div>
|
1248
|
+
<div class="tags">
|
1249
|
+
<p class="tag_title">Parameters:</p>
|
1250
|
+
<ul class="param">
|
1251
|
+
|
1252
|
+
<li>
|
1253
|
+
|
1254
|
+
<span class='name'>service_name</span>
|
1255
|
+
|
1256
|
+
|
1257
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
—
|
1262
|
+
<div class='inline'>
|
1263
|
+
<p>name of the service run</p>
|
1264
|
+
</div>
|
1265
|
+
|
1266
|
+
</li>
|
1267
|
+
|
1268
|
+
</ul>
|
1269
|
+
|
1270
|
+
<p class="tag_title">Returns:</p>
|
1271
|
+
<ul class="return">
|
1272
|
+
|
1273
|
+
<li>
|
1274
|
+
|
1275
|
+
|
1276
|
+
<span class='type'>(<tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>)</span>
|
1277
|
+
|
1278
|
+
|
1279
|
+
|
1280
|
+
—
|
1281
|
+
<div class='inline'>
|
1282
|
+
<p>the service record updated</p>
|
1283
|
+
</div>
|
1284
|
+
|
1285
|
+
</li>
|
1286
|
+
|
1287
|
+
</ul>
|
1288
|
+
|
1289
|
+
</div><table class="source_code">
|
1290
|
+
<tr>
|
1291
|
+
<td>
|
1292
|
+
<pre class="lines">
|
1293
|
+
|
1294
|
+
|
1295
|
+
62
|
1296
|
+
63
|
1297
|
+
64
|
1298
|
+
65
|
1299
|
+
66</pre>
|
1300
|
+
</td>
|
1301
|
+
<td>
|
1302
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 62</span>
|
1303
|
+
|
1304
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update_service_as_failed'>update_service_as_failed</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span>
|
1305
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span> <span class='op'>=</span> <span class='id identifier rubyid_service'>service</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_add_service'>add_service</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span>
|
1306
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span><span class='period'>.</span><span class='id identifier rubyid_failure_timestamp'>failure_timestamp</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ServiceDateHelper.html" title="Longleaf::ServiceDateHelper (class)">ServiceDateHelper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_formatted_timestamp'><span class='object_link'><a href="ServiceDateHelper.html#formatted_timestamp-class_method" title="Longleaf::ServiceDateHelper.formatted_timestamp (method)">formatted_timestamp</a></span></span>
|
1307
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span>
|
1308
|
+
<span class='kw'>end</span></pre>
|
1309
|
+
</td>
|
1310
|
+
</tr>
|
1311
|
+
</table>
|
1312
|
+
</div>
|
1313
|
+
|
1314
|
+
<div class="method_details ">
|
1315
|
+
<h3 class="signature " id="update_service_as_performed-instance_method">
|
1316
|
+
|
1317
|
+
#<strong>update_service_as_performed</strong>(service_name) ⇒ <tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>
|
1318
|
+
|
1319
|
+
|
1320
|
+
|
1321
|
+
|
1322
|
+
|
1323
|
+
</h3><div class="docstring">
|
1324
|
+
<div class="discussion">
|
1325
|
+
|
1326
|
+
<p>Updates details of service record as if the service had been executed.</p>
|
1327
|
+
|
1328
|
+
|
1329
|
+
</div>
|
1330
|
+
</div>
|
1331
|
+
<div class="tags">
|
1332
|
+
<p class="tag_title">Parameters:</p>
|
1333
|
+
<ul class="param">
|
1334
|
+
|
1335
|
+
<li>
|
1336
|
+
|
1337
|
+
<span class='name'>service_name</span>
|
1338
|
+
|
1339
|
+
|
1340
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1341
|
+
|
1342
|
+
|
1343
|
+
|
1344
|
+
—
|
1345
|
+
<div class='inline'>
|
1346
|
+
<p>name of the service run</p>
|
1347
|
+
</div>
|
1348
|
+
|
1349
|
+
</li>
|
1350
|
+
|
1351
|
+
</ul>
|
1352
|
+
|
1353
|
+
<p class="tag_title">Returns:</p>
|
1354
|
+
<ul class="return">
|
1355
|
+
|
1356
|
+
<li>
|
1357
|
+
|
1358
|
+
|
1359
|
+
<span class='type'>(<tt><span class='object_link'><a href="ServiceRecord.html" title="Longleaf::ServiceRecord (class)">ServiceRecord</a></span></tt>)</span>
|
1360
|
+
|
1361
|
+
|
1362
|
+
|
1363
|
+
—
|
1364
|
+
<div class='inline'>
|
1365
|
+
<p>the service record updated</p>
|
1366
|
+
</div>
|
1367
|
+
|
1368
|
+
</li>
|
1369
|
+
|
1370
|
+
</ul>
|
1371
|
+
|
1372
|
+
</div><table class="source_code">
|
1373
|
+
<tr>
|
1374
|
+
<td>
|
1375
|
+
<pre class="lines">
|
1376
|
+
|
1377
|
+
|
1378
|
+
51
|
1379
|
+
52
|
1380
|
+
53
|
1381
|
+
54
|
1382
|
+
55
|
1383
|
+
56</pre>
|
1384
|
+
</td>
|
1385
|
+
<td>
|
1386
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/models/metadata_record.rb', line 51</span>
|
1387
|
+
|
1388
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update_service_as_performed'>update_service_as_performed</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span>
|
1389
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span> <span class='op'>=</span> <span class='id identifier rubyid_service'>service</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_add_service'>add_service</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span>
|
1390
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span><span class='period'>.</span><span class='id identifier rubyid_run_needed'>run_needed</span> <span class='op'>=</span> <span class='kw'>false</span>
|
1391
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span><span class='period'>.</span><span class='id identifier rubyid_timestamp'>timestamp</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ServiceDateHelper.html" title="Longleaf::ServiceDateHelper (class)">ServiceDateHelper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_formatted_timestamp'><span class='object_link'><a href="ServiceDateHelper.html#formatted_timestamp-class_method" title="Longleaf::ServiceDateHelper.formatted_timestamp (method)">formatted_timestamp</a></span></span>
|
1392
|
+
<span class='id identifier rubyid_service_rec'>service_rec</span>
|
1393
|
+
<span class='kw'>end</span></pre>
|
1394
|
+
</td>
|
1395
|
+
</tr>
|
1396
|
+
</table>
|
1397
|
+
</div>
|
1398
|
+
|
1399
|
+
</div>
|
1400
|
+
|
1401
|
+
</div>
|
1402
|
+
|
1403
|
+
<div id="footer">
|
1404
|
+
Generated on Tue May 28 15:48:01 2019 by
|
1405
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1406
|
+
0.9.19 (ruby-2.6.3).
|
1407
|
+
</div>
|
1408
|
+
|
1409
|
+
</div>
|
1410
|
+
</body>
|
1411
|
+
</html>
|