files.com 1.1.813 → 1.1.814

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/doc/Files/APIConnectionError.html +1 -1
  4. data/doc/Files/APIError.html +1 -1
  5. data/doc/Files/AccountAlreadyExistsError.html +1 -1
  6. data/doc/Files/AccountLineItem.html +1 -1
  7. data/doc/Files/AccountOverdueError.html +1 -1
  8. data/doc/Files/Action.html +1 -1
  9. data/doc/Files/ActionLog.html +1 -1
  10. data/doc/Files/ActionNotificationExport.html +1 -1
  11. data/doc/Files/ActionNotificationExportResult.html +1 -1
  12. data/doc/Files/AdditionalAuthenticationRequiredError.html +1 -1
  13. data/doc/Files/AgentNode.html +1 -1
  14. data/doc/Files/AgentNodeConnection.html +1 -1
  15. data/doc/Files/AgentNodeInstance.html +1 -1
  16. data/doc/Files/AgentPushUpdate.html +1 -1
  17. data/doc/Files/AgentPushUpdateBlockedError.html +1 -1
  18. data/doc/Files/AgentUnavailableError.html +1 -1
  19. data/doc/Files/AgentUpgradeRequiredError.html +1 -1
  20. data/doc/Files/AiAssistantPersonality.html +1 -1
  21. data/doc/Files/AiTask.html +1 -1
  22. data/doc/Files/AiTaskCannotBeRunManuallyError.html +1 -1
  23. data/doc/Files/AlreadyCompletedError.html +1 -1
  24. data/doc/Files/Api.html +20 -13
  25. data/doc/Files/ApiClient/RequestLogContext.html +29 -29
  26. data/doc/Files/ApiClient/TransferSettings.html +721 -0
  27. data/doc/Files/ApiClient.html +756 -204
  28. data/doc/Files/ApiKey.html +1 -1
  29. data/doc/Files/ApiKeyIsDisabledError.html +1 -1
  30. data/doc/Files/ApiKeyIsPathRestrictedError.html +1 -1
  31. data/doc/Files/ApiKeyNotFoundError.html +1 -1
  32. data/doc/Files/ApiKeyOnlyForDesktopAppError.html +1 -1
  33. data/doc/Files/ApiKeyOnlyForFileOperationsError.html +1 -1
  34. data/doc/Files/ApiKeyOnlyForMobileAppError.html +1 -1
  35. data/doc/Files/ApiKeyOnlyForOfficeIntegrationError.html +1 -1
  36. data/doc/Files/ApiKeySessionsNotSupportedError.html +1 -1
  37. data/doc/Files/ApiRequestLog.html +1 -1
  38. data/doc/Files/App.html +1 -1
  39. data/doc/Files/As2IncomingMessage.html +1 -1
  40. data/doc/Files/As2OutgoingMessage.html +1 -1
  41. data/doc/Files/As2Partner.html +1 -1
  42. data/doc/Files/As2Station.html +1 -1
  43. data/doc/Files/AttachmentTooLargeError.html +1 -1
  44. data/doc/Files/AuthenticationError.html +1 -1
  45. data/doc/Files/AuthenticationRequiredError.html +1 -1
  46. data/doc/Files/Auto.html +1 -1
  47. data/doc/Files/Automation.html +1 -1
  48. data/doc/Files/AutomationAuthoringSchema.html +1 -1
  49. data/doc/Files/AutomationCannotBeRunManuallyError.html +1 -1
  50. data/doc/Files/AutomationExecutionNode.html +1 -1
  51. data/doc/Files/AutomationLog.html +1 -1
  52. data/doc/Files/AutomationRun.html +1 -1
  53. data/doc/Files/AutomationsUnavailableError.html +1 -1
  54. data/doc/Files/BadRequestError.html +1 -1
  55. data/doc/Files/BandwidthSnapshot.html +1 -1
  56. data/doc/Files/Behavior.html +1 -1
  57. data/doc/Files/BehaviorNotAllowedOnRemoteServerError.html +1 -1
  58. data/doc/Files/BillingInformationHiddenError.html +1 -1
  59. data/doc/Files/BillingPermissionRequiredError.html +1 -1
  60. data/doc/Files/BufferedUploadDisabledForThisDestinationError.html +1 -1
  61. data/doc/Files/Bundle.html +1 -1
  62. data/doc/Files/BundleAction.html +1 -1
  63. data/doc/Files/BundleDownload.html +1 -1
  64. data/doc/Files/BundleMaximumUsesReachedError.html +1 -1
  65. data/doc/Files/BundleNotification.html +1 -1
  66. data/doc/Files/BundleOnlyAllowsPreviewsError.html +1 -1
  67. data/doc/Files/BundleOperationRequiresSubfolderError.html +1 -1
  68. data/doc/Files/BundlePath.html +1 -1
  69. data/doc/Files/BundlePathNotFoundError.html +1 -1
  70. data/doc/Files/BundlePermissionRequiredError.html +1 -1
  71. data/doc/Files/BundleRecipient.html +1 -1
  72. data/doc/Files/BundleRegistration.html +1 -1
  73. data/doc/Files/BundleRegistrationCodeFailedError.html +1 -1
  74. data/doc/Files/BundleRegistrationNotFoundError.html +1 -1
  75. data/doc/Files/CannotAdministerHigherLevelUserError.html +1 -1
  76. data/doc/Files/CannotDownloadDirectoryError.html +1 -1
  77. data/doc/Files/CannotLoginWhileUsingKeyError.html +1 -1
  78. data/doc/Files/CantActForOtherUserError.html +1 -1
  79. data/doc/Files/CantMoveWithMultipleLocationsError.html +1 -1
  80. data/doc/Files/ChatMessage.html +1 -1
  81. data/doc/Files/ChatSession.html +1 -1
  82. data/doc/Files/ChildSiteManagementPolicy.html +1 -1
  83. data/doc/Files/Clickwrap.html +1 -1
  84. data/doc/Files/CodeNotFoundError.html +1 -1
  85. data/doc/Files/ConfigurationLockedPathError.html +1 -1
  86. data/doc/Files/ContactAdminForPasswordChangeHelpError.html +1 -1
  87. data/doc/Files/CouldNotCreateParentError.html +1 -1
  88. data/doc/Files/CustomDomain.html +1 -1
  89. data/doc/Files/DatetimeParseError.html +1 -1
  90. data/doc/Files/DesktopConfigurationProfile.html +1 -1
  91. data/doc/Files/DestinationExistsError.html +1 -1
  92. data/doc/Files/DestinationFolderLimitedError.html +1 -1
  93. data/doc/Files/DestinationParentConflictError.html +1 -1
  94. data/doc/Files/DestinationParentDoesNotExistError.html +1 -1
  95. data/doc/Files/DestinationSameError.html +1 -1
  96. data/doc/Files/DestinationSiteMismatchError.html +1 -1
  97. data/doc/Files/DirectConnectionInfo.html +1 -1
  98. data/doc/Files/DnsRecord.html +1 -1
  99. data/doc/Files/DoesNotSupportSortingError.html +1 -1
  100. data/doc/Files/DuplicateShareRecipientError.html +1 -1
  101. data/doc/Files/EmailIncomingMessage.html +1 -1
  102. data/doc/Files/EmailLog.html +1 -1
  103. data/doc/Files/Error.html +2 -2
  104. data/doc/Files/Errors.html +1 -1
  105. data/doc/Files/EventChannel.html +1 -1
  106. data/doc/Files/EventDeliveryAttempt.html +1 -1
  107. data/doc/Files/EventRecord.html +1 -1
  108. data/doc/Files/EventSubscription.html +1 -1
  109. data/doc/Files/EventTarget.html +1 -1
  110. data/doc/Files/ExavaultApiRequestLog.html +1 -1
  111. data/doc/Files/ExceededRuntimeLimitError.html +1 -1
  112. data/doc/Files/Expectation.html +1 -1
  113. data/doc/Files/ExpectationAlreadyHasOpenWindowError.html +1 -1
  114. data/doc/Files/ExpectationEvaluation.html +1 -1
  115. data/doc/Files/ExpectationIncident.html +1 -1
  116. data/doc/Files/ExpectationNotManualTriggerError.html +1 -1
  117. data/doc/Files/ExpiredPrivateKeyError.html +1 -1
  118. data/doc/Files/ExpiredPublicKeyError.html +1 -1
  119. data/doc/Files/ExportFailureError.html +1 -1
  120. data/doc/Files/ExportNotReadyError.html +1 -1
  121. data/doc/Files/ExternalEvent.html +1 -1
  122. data/doc/Files/FailedToChangePasswordError.html +1 -1
  123. data/doc/Files/File.html +2019 -1515
  124. data/doc/Files/FileAction.html +1 -1
  125. data/doc/Files/FileActionError.html +1 -1
  126. data/doc/Files/FileComment.html +1 -1
  127. data/doc/Files/FileCommentReaction.html +1 -1
  128. data/doc/Files/FileLockedError.html +1 -1
  129. data/doc/Files/FileMigration.html +1 -1
  130. data/doc/Files/FileMigrationLog.html +1 -1
  131. data/doc/Files/FileNotFoundError.html +1 -1
  132. data/doc/Files/FileNotUploadedError.html +1 -1
  133. data/doc/Files/FilePendingProcessingError.html +1 -1
  134. data/doc/Files/FileProcessingErrorError.html +1 -1
  135. data/doc/Files/FileTooBigToDecryptError.html +1 -1
  136. data/doc/Files/FileTooBigToEncryptError.html +1 -1
  137. data/doc/Files/FileUploadNotFoundError.html +1 -1
  138. data/doc/Files/FileUploadPart.html +1 -1
  139. data/doc/Files/FileUploadedToWrongRegionError.html +1 -1
  140. data/doc/Files/FileUtils.html +1 -1
  141. data/doc/Files/FilenameTooLongError.html +1 -1
  142. data/doc/Files/FilesAgentFailedAuthorizationError.html +1 -1
  143. data/doc/Files/FilesNativeStorageOverloadedError.html +1 -1
  144. data/doc/Files/Folder.html +1 -1
  145. data/doc/Files/FolderAdminOrBillingPermissionRequiredError.html +1 -1
  146. data/doc/Files/FolderAdminPermissionRequiredError.html +1 -1
  147. data/doc/Files/FolderLockedError.html +1 -1
  148. data/doc/Files/FolderMustNotBeAFileError.html +1 -1
  149. data/doc/Files/FolderNotEmptyError.html +1 -1
  150. data/doc/Files/FoldersNotAllowedError.html +1 -1
  151. data/doc/Files/FormField.html +1 -1
  152. data/doc/Files/FormFieldSet.html +1 -1
  153. data/doc/Files/FtpActionLog.html +1 -1
  154. data/doc/Files/FullPermissionRequiredError.html +1 -1
  155. data/doc/Files/GpgKey.html +1 -1
  156. data/doc/Files/Group.html +1 -1
  157. data/doc/Files/GroupNotFoundError.html +1 -1
  158. data/doc/Files/GroupUser.html +1 -1
  159. data/doc/Files/History.html +1 -1
  160. data/doc/Files/HistoryExport.html +1 -1
  161. data/doc/Files/HistoryExportResult.html +1 -1
  162. data/doc/Files/HistoryPermissionRequiredError.html +1 -1
  163. data/doc/Files/HistoryUnavailableError.html +1 -1
  164. data/doc/Files/HolidayCalendar.html +1 -1
  165. data/doc/Files/HolidayRegion.html +1 -1
  166. data/doc/Files/Image.html +1 -1
  167. data/doc/Files/InAppAiAssistantUnavailableError.html +1 -1
  168. data/doc/Files/InboundS3Log.html +1 -1
  169. data/doc/Files/InboxNotFoundError.html +1 -1
  170. data/doc/Files/InboxRecipient.html +1 -1
  171. data/doc/Files/InboxRegistration.html +1 -1
  172. data/doc/Files/InboxRegistrationCodeFailedError.html +1 -1
  173. data/doc/Files/InboxUpload.html +1 -1
  174. data/doc/Files/InsufficientPermissionForParamsError.html +1 -1
  175. data/doc/Files/InsufficientPermissionForSiteError.html +1 -1
  176. data/doc/Files/IntegrationCentricProfile.html +1 -1
  177. data/doc/Files/InternalGeneralErrorError.html +1 -1
  178. data/doc/Files/InvalidBodyError.html +1 -1
  179. data/doc/Files/InvalidBundleCodeError.html +1 -1
  180. data/doc/Files/InvalidCredentialsError.html +1 -1
  181. data/doc/Files/InvalidCursorError.html +1 -1
  182. data/doc/Files/InvalidCursorTypeForSortError.html +1 -1
  183. data/doc/Files/InvalidEtagsError.html +1 -1
  184. data/doc/Files/InvalidFileTypeError.html +1 -1
  185. data/doc/Files/InvalidFilenameError.html +1 -1
  186. data/doc/Files/InvalidFilterAliasCombinationError.html +1 -1
  187. data/doc/Files/InvalidFilterFieldError.html +1 -1
  188. data/doc/Files/InvalidFilterParamError.html +1 -1
  189. data/doc/Files/InvalidFilterParamFormatError.html +1 -1
  190. data/doc/Files/InvalidFilterParamValueError.html +1 -1
  191. data/doc/Files/InvalidInputEncodingError.html +1 -1
  192. data/doc/Files/InvalidInterfaceError.html +1 -1
  193. data/doc/Files/InvalidOauthError.html +1 -1
  194. data/doc/Files/InvalidOauthProviderError.html +1 -1
  195. data/doc/Files/InvalidOrExpiredCodeError.html +1 -1
  196. data/doc/Files/InvalidParameterError.html +5 -1
  197. data/doc/Files/InvalidPathError.html +1 -1
  198. data/doc/Files/InvalidPriorityColorError.html +1 -1
  199. data/doc/Files/InvalidRangeError.html +1 -1
  200. data/doc/Files/InvalidReturnToUrlError.html +1 -1
  201. data/doc/Files/InvalidSearchQueryError.html +1 -1
  202. data/doc/Files/InvalidSessionError.html +1 -1
  203. data/doc/Files/InvalidSiteError.html +1 -1
  204. data/doc/Files/InvalidSortFieldError.html +1 -1
  205. data/doc/Files/InvalidSortFilterCombinationError.html +1 -1
  206. data/doc/Files/InvalidUploadOffsetError.html +1 -1
  207. data/doc/Files/InvalidUploadPartGapError.html +1 -1
  208. data/doc/Files/InvalidUploadPartSizeError.html +1 -1
  209. data/doc/Files/InvalidUsernameOrPasswordError.html +1 -1
  210. data/doc/Files/InvalidWorkspaceIdHeaderError.html +1 -1
  211. data/doc/Files/InvalidZipFileError.html +1 -1
  212. data/doc/Files/Invoice.html +1 -1
  213. data/doc/Files/InvoiceLineItem.html +1 -1
  214. data/doc/Files/IpAddress.html +1 -1
  215. data/doc/Files/KeyLifecycleRule.html +1 -1
  216. data/doc/Files/List.html +1 -1
  217. data/doc/Files/Lock.html +1 -1
  218. data/doc/Files/LockOperationBusyError.html +1 -1
  219. data/doc/Files/LockedOutError.html +1 -1
  220. data/doc/Files/LockoutRegionMismatchError.html +1 -1
  221. data/doc/Files/MetadataCategory.html +1 -1
  222. data/doc/Files/MetadataNotSupportedOnRemotesError.html +1 -1
  223. data/doc/Files/MethodNotAllowedError.html +1 -1
  224. data/doc/Files/MigrationInProgressError.html +1 -1
  225. data/doc/Files/MissingParameterError.html +1 -1
  226. data/doc/Files/ModelSaveErrorError.html +1 -1
  227. data/doc/Files/MoverAccessDeniedError.html +1 -1
  228. data/doc/Files/MoverPackageRequiredError.html +1 -1
  229. data/doc/Files/MultipleProcessingErrorsError.html +1 -1
  230. data/doc/Files/MultipleSortParamsNotAllowedError.html +1 -1
  231. data/doc/Files/MustAuthenticateWithApiKeyError.html +1 -1
  232. data/doc/Files/NeedAdminPermissionForInboxError.html +1 -1
  233. data/doc/Files/NestedNotFoundError.html +1 -1
  234. data/doc/Files/NoAccountForSiteError.html +1 -1
  235. data/doc/Files/NoValidInputParamsError.html +1 -1
  236. data/doc/Files/NonAdminsMustQueryByFolderOrPathError.html +1 -1
  237. data/doc/Files/NotAllowedToCreateBundleError.html +1 -1
  238. data/doc/Files/NotAuthenticatedError.html +1 -1
  239. data/doc/Files/NotAuthorizedError.html +1 -1
  240. data/doc/Files/NotEnqueuableSyncError.html +1 -1
  241. data/doc/Files/NotFoundError.html +1 -1
  242. data/doc/Files/NotImplementedError.html +1 -1
  243. data/doc/Files/Notification.html +1 -1
  244. data/doc/Files/OffsetUploadNotAllowedWithMalwareScanningError.html +1 -1
  245. data/doc/Files/OneTimePasswordIncorrectError.html +1 -1
  246. data/doc/Files/OutboundConnectionLog.html +1 -1
  247. data/doc/Files/PartNumberTooLargeError.html +1 -1
  248. data/doc/Files/Partner.html +1 -1
  249. data/doc/Files/PartnerChannel.html +1 -1
  250. data/doc/Files/PartnerChannelTemplate.html +1 -1
  251. data/doc/Files/PartnerConnection.html +1 -1
  252. data/doc/Files/PartnerSite.html +1 -1
  253. data/doc/Files/PartnerSiteRequest.html +1 -1
  254. data/doc/Files/PasswordChangeNotRequiredError.html +1 -1
  255. data/doc/Files/PasswordChangeRequiredError.html +1 -1
  256. data/doc/Files/PathCannotHaveTrailingWhitespaceError.html +1 -1
  257. data/doc/Files/PathTooLongError.html +1 -1
  258. data/doc/Files/PathUtil.html +1 -1
  259. data/doc/Files/Payment.html +1 -1
  260. data/doc/Files/PaymentLineItem.html +1 -1
  261. data/doc/Files/PaymentMethodErrorError.html +1 -1
  262. data/doc/Files/PendingWorkEvent.html +1 -1
  263. data/doc/Files/Permission.html +1 -1
  264. data/doc/Files/PlanNotFoundError.html +1 -1
  265. data/doc/Files/Preview.html +1 -1
  266. data/doc/Files/PreviewOnlyPermissionCannotDownloadError.html +1 -1
  267. data/doc/Files/ProcessingFailureError.html +1 -1
  268. data/doc/Files/PublicHostingRequestLog.html +1 -1
  269. data/doc/Files/PublicIpAddress.html +1 -1
  270. data/doc/Files/PublicKey.html +1 -1
  271. data/doc/Files/RateLimitedError.html +1 -1
  272. data/doc/Files/ReadOnlySessionError.html +1 -1
  273. data/doc/Files/ReadPermissionRequiredError.html +1 -1
  274. data/doc/Files/ReauthenticationFailedError.html +1 -1
  275. data/doc/Files/ReauthenticationFailedFinalError.html +1 -1
  276. data/doc/Files/ReauthenticationNeededActionError.html +1 -1
  277. data/doc/Files/ReauthenticationNeededFieldsError.html +1 -1
  278. data/doc/Files/ReauthenticationRateLimitedError.html +1 -1
  279. data/doc/Files/RecaptchaFailedError.html +1 -1
  280. data/doc/Files/RecipientAlreadySharedError.html +1 -1
  281. data/doc/Files/RemoteBandwidthSnapshot.html +1 -1
  282. data/doc/Files/RemoteDesktopDebugLoggingDisabledError.html +1 -1
  283. data/doc/Files/RemoteEntryReadOnlyError.html +1 -1
  284. data/doc/Files/RemoteMountBackend.html +1 -1
  285. data/doc/Files/RemoteServer.html +1 -1
  286. data/doc/Files/RemoteServerConfigurationFile.html +1 -1
  287. data/doc/Files/RemoteServerCredential.html +1 -1
  288. data/doc/Files/RemoteServerErrorError.html +1 -1
  289. data/doc/Files/Request.html +1 -1
  290. data/doc/Files/RequestBodyTooLargeError.html +1 -1
  291. data/doc/Files/RequestParamsContainInvalidCharacterError.html +1 -1
  292. data/doc/Files/RequestParamsInvalidError.html +1 -1
  293. data/doc/Files/RequestParamsRequiredError.html +1 -1
  294. data/doc/Files/ResourceBelongsToParentSiteError.html +1 -1
  295. data/doc/Files/ResourceLockedError.html +1 -1
  296. data/doc/Files/Response.html +1 -1
  297. data/doc/Files/Restore.html +1 -1
  298. data/doc/Files/RootFolderBehaviorSiteAdminRequiredError.html +1 -1
  299. data/doc/Files/RootFolderBehaviorSkipSiteAdminRequiredError.html +1 -1
  300. data/doc/Files/Schedule.html +1 -1
  301. data/doc/Files/ScheduledExport.html +1 -1
  302. data/doc/Files/ScimLog.html +1 -1
  303. data/doc/Files/SearchAllOnChildPathError.html +1 -1
  304. data/doc/Files/SearchUnavailableError.html +1 -1
  305. data/doc/Files/Secret.html +1 -1
  306. data/doc/Files/SelfManagedRequiredError.html +1 -1
  307. data/doc/Files/ServiceUnavailableError.html +1 -1
  308. data/doc/Files/Session.html +1 -1
  309. data/doc/Files/SettingsChange.html +1 -1
  310. data/doc/Files/SftpActionLog.html +1 -1
  311. data/doc/Files/SftpHostKey.html +1 -1
  312. data/doc/Files/ShareGroup.html +1 -1
  313. data/doc/Files/ShareGroupMember.html +1 -1
  314. data/doc/Files/SiemHttpDestination.html +1 -1
  315. data/doc/Files/SiemHttpDestinationEvent.html +1 -1
  316. data/doc/Files/Site.html +1 -1
  317. data/doc/Files/SiteAdminOrPartnerAdminPermissionRequiredError.html +1 -1
  318. data/doc/Files/SiteAdminOrWorkspaceAdminOrFolderAdminPermissionRequiredError.html +1 -1
  319. data/doc/Files/SiteAdminOrWorkspaceAdminOrPartnerAdminOrFolderAdminPermissionRequiredError.html +1 -1
  320. data/doc/Files/SiteAdminOrWorkspaceAdminOrPartnerAdminPermissionRequiredError.html +1 -1
  321. data/doc/Files/SiteAdminOrWorkspaceAdminPermissionRequiredError.html +1 -1
  322. data/doc/Files/SiteAdminRequiredError.html +1 -1
  323. data/doc/Files/SiteConfigurationError.html +1 -1
  324. data/doc/Files/SiteDisabledError.html +1 -1
  325. data/doc/Files/SiteFilesAreImmutableError.html +1 -1
  326. data/doc/Files/SiteNotFoundError.html +1 -1
  327. data/doc/Files/SiteSubdomainRedirect.html +1 -1
  328. data/doc/Files/SiteWasRemovedError.html +1 -1
  329. data/doc/Files/SizableIO.html +1 -1
  330. data/doc/Files/Snapshot.html +1 -1
  331. data/doc/Files/SsoEvent.html +1 -1
  332. data/doc/Files/SsoStrategy.html +1 -1
  333. data/doc/Files/Status.html +1 -1
  334. data/doc/Files/Style.html +1 -1
  335. data/doc/Files/SubfolderLockedError.html +1 -1
  336. data/doc/Files/Sync.html +1 -1
  337. data/doc/Files/SyncInProgressError.html +1 -1
  338. data/doc/Files/SyncLog.html +1 -1
  339. data/doc/Files/SyncRun.html +1 -1
  340. data/doc/Files/SyncRunLiveTransfer.html +1 -1
  341. data/doc/Files/SystemProfiler.html +1 -1
  342. data/doc/Files/TooManyConcurrentLoginsError.html +1 -1
  343. data/doc/Files/TooManyConcurrentRequestsError.html +1 -1
  344. data/doc/Files/TooManyLoginAttemptsError.html +1 -1
  345. data/doc/Files/TooManyRequestsError.html +1 -1
  346. data/doc/Files/TooManySharesError.html +1 -1
  347. data/doc/Files/Transfer/BufferLimitError.html +175 -0
  348. data/doc/Files/Transfer/ByteBudget/Reservation.html +301 -0
  349. data/doc/Files/Transfer/ByteBudget.html +748 -0
  350. data/doc/Files/Transfer/CancelledError.html +235 -0
  351. data/doc/Files/Transfer/Checkpoint.html +1371 -0
  352. data/doc/Files/Transfer/CheckpointError.html +173 -0
  353. data/doc/Files/Transfer/ClientTransport/ClientResponse.html +661 -0
  354. data/doc/Files/Transfer/ClientTransport/Reader.html +530 -0
  355. data/doc/Files/Transfer/ClientTransport.html +675 -0
  356. data/doc/Files/Transfer/Clock.html +189 -0
  357. data/doc/Files/Transfer/Control.html +667 -0
  358. data/doc/Files/Transfer/Controller/Attempt.html +465 -0
  359. data/doc/Files/Transfer/Controller.html +1166 -0
  360. data/doc/Files/Transfer/Coordinator/Timing.html +568 -0
  361. data/doc/Files/Transfer/Coordinator.html +534 -0
  362. data/doc/Files/Transfer/DownloadCoordinator/FileSink.html +976 -0
  363. data/doc/Files/Transfer/DownloadCoordinator/IoSink.html +1168 -0
  364. data/doc/Files/Transfer/DownloadCoordinator/Piece.html +875 -0
  365. data/doc/Files/Transfer/DownloadCoordinator.html +728 -0
  366. data/doc/Files/Transfer/FileSlots.html +480 -0
  367. data/doc/Files/Transfer/FrontendResponseError.html +235 -0
  368. data/doc/Files/Transfer/Holds.html +505 -0
  369. data/doc/Files/Transfer/HttpTransport.html +579 -0
  370. data/doc/Files/Transfer/Job.html +2338 -0
  371. data/doc/Files/Transfer/Options.html +924 -0
  372. data/doc/Files/Transfer/PausedError.html +319 -0
  373. data/doc/Files/Transfer/Policy.html +1642 -0
  374. data/doc/Files/Transfer/RequestPermits.html +160 -0
  375. data/doc/Files/Transfer/SourceChangedError.html +235 -0
  376. data/doc/Files/Transfer/StorageResponse.html +546 -0
  377. data/doc/Files/Transfer/StorageRetry.html +1098 -0
  378. data/doc/Files/Transfer/UploadCoordinator/Grant.html +1048 -0
  379. data/doc/Files/Transfer/UploadCoordinator/Part.html +1048 -0
  380. data/doc/Files/Transfer/UploadCoordinator/Region.html +295 -0
  381. data/doc/Files/Transfer/UploadCoordinator/Segments.html +299 -0
  382. data/doc/Files/Transfer/UploadCoordinator/Source.html +725 -0
  383. data/doc/Files/Transfer/UploadCoordinator/StreamSource.html +664 -0
  384. data/doc/Files/Transfer/UploadCoordinator.html +546 -0
  385. data/doc/Files/Transfer/UploadPlan.html +522 -0
  386. data/doc/Files/Transfer/VersionChangedError.html +235 -0
  387. data/doc/Files/Transfer.html +134 -0
  388. data/doc/Files/TrialExpiredError.html +1 -1
  389. data/doc/Files/TrialLockedError.html +1 -1
  390. data/doc/Files/TwoFactorAuthenticationCodeAlreadySentError.html +1 -1
  391. data/doc/Files/TwoFactorAuthenticationCountryBlacklistedError.html +1 -1
  392. data/doc/Files/TwoFactorAuthenticationErrorError.html +1 -1
  393. data/doc/Files/TwoFactorAuthenticationGeneralErrorError.html +1 -1
  394. data/doc/Files/TwoFactorAuthenticationMethodUnsupportedErrorError.html +1 -1
  395. data/doc/Files/TwoFactorAuthenticationRequiredError.html +1 -1
  396. data/doc/Files/TwoFactorAuthenticationSetupExpiredError.html +1 -1
  397. data/doc/Files/TwoFactorAuthenticationUnsubscribedRecipientError.html +1 -1
  398. data/doc/Files/URI.html +1 -1
  399. data/doc/Files/UnrecognizedSortIndexError.html +1 -1
  400. data/doc/Files/UnsupportedCurrencyError.html +1 -1
  401. data/doc/Files/UnsupportedHttpResponseFormatError.html +1 -1
  402. data/doc/Files/UnsupportedMediaTypeError.html +1 -1
  403. data/doc/Files/UpdatesNotAllowedForRemotesError.html +1 -1
  404. data/doc/Files/UploadsUnavailableError.html +1 -1
  405. data/doc/Files/UsageByTopLevelDir.html +1 -1
  406. data/doc/Files/UsageDailySnapshot.html +1 -1
  407. data/doc/Files/UsageSnapshot.html +1 -1
  408. data/doc/Files/User.html +1 -1
  409. data/doc/Files/UserAdditionalEmailRecipient.html +1 -1
  410. data/doc/Files/UserCipherUse.html +1 -1
  411. data/doc/Files/UserIdInvalidError.html +1 -1
  412. data/doc/Files/UserIdOnUserEndpointError.html +1 -1
  413. data/doc/Files/UserIdWithoutSiteAdminError.html +1 -1
  414. data/doc/Files/UserLifecycleRule.html +1 -1
  415. data/doc/Files/UserNotFoundError.html +1 -1
  416. data/doc/Files/UserRequest.html +1 -1
  417. data/doc/Files/UserRequestsEnabledRequiredError.html +1 -1
  418. data/doc/Files/UserRequiredError.html +1 -1
  419. data/doc/Files/UserSecurityEvent.html +1 -1
  420. data/doc/Files/UserSftpClientUse.html +1 -1
  421. data/doc/Files/Util/LogSettings.html +1 -1
  422. data/doc/Files/Util.html +1 -1
  423. data/doc/Files/WebDavActionLog.html +1 -1
  424. data/doc/Files/WebhookTest.html +1 -1
  425. data/doc/Files/Workspace.html +1 -1
  426. data/doc/Files/WriteAndBundlePermissionRequiredError.html +1 -1
  427. data/doc/Files/WritePermissionRequiredError.html +1 -1
  428. data/doc/Files/ZipListEntry.html +1 -1
  429. data/doc/Files.html +116 -116
  430. data/doc/_index.html +314 -4
  431. data/doc/class_list.html +1 -1
  432. data/doc/file.README.html +1 -1
  433. data/doc/index.html +1 -1
  434. data/doc/method_list.html +4703 -2415
  435. data/doc/top-level-namespace.html +1 -1
  436. data/docs/file.md +346 -0
  437. data/lib/files.com/api.rb +6 -1
  438. data/lib/files.com/api_client.rb +220 -32
  439. data/lib/files.com/models/file.rb +124 -17
  440. data/lib/files.com/transfer/budgets.rb +123 -0
  441. data/lib/files.com/transfer/checkpoint.rb +113 -0
  442. data/lib/files.com/transfer/clock.rb +14 -0
  443. data/lib/files.com/transfer/controller.rb +549 -0
  444. data/lib/files.com/transfer/download_coordinator.rb +906 -0
  445. data/lib/files.com/transfer/errors.rb +100 -0
  446. data/lib/files.com/transfer/http_transport.rb +337 -0
  447. data/lib/files.com/transfer/job.rb +778 -0
  448. data/lib/files.com/transfer/options.rb +126 -0
  449. data/lib/files.com/transfer/policy.rb +91 -0
  450. data/lib/files.com/transfer/storage_retry.rb +169 -0
  451. data/lib/files.com/transfer/upload_coordinator.rb +657 -0
  452. data/lib/files.com/transfer/upload_plan.rb +157 -0
  453. data/lib/files.com.rb +13 -0
  454. data/spec/lib/api_client_spec.rb +125 -3
  455. data/spec/models/file_transfer_spec.rb +53 -4
  456. data/spec/support/transfer_server.rb +113 -14
  457. data/spec/transfer/adaptive_download_spec.rb +1102 -0
  458. data/spec/transfer/adaptive_upload_spec.rb +1602 -0
  459. data/spec/transfer/concurrency_controller_spec.rb +382 -0
  460. data/spec/workspace_id_spec.rb +19 -14
  461. metadata +59 -1
@@ -0,0 +1,1166 @@
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: Files::Transfer::Controller
8
+
9
+ &mdash; Documentation by YARD 0.9.45
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css">
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css">
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Files::Transfer::Controller";
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 id="main_progress" aria-hidden="true"></div>
31
+
32
+ <div class="nav_wrap">
33
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
34
+ <div id="resizer"></div>
35
+ </div>
36
+
37
+ <div id="main" tabindex="-1">
38
+ <div id="header">
39
+ <div id="menu">
40
+
41
+ <a href="../../_index.html">Index (C)</a> &raquo;
42
+ <span class='title'><span class='object_link'><a href="../../Files.html" title="Files (module)">Files</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Transfer.html" title="Files::Transfer (module)">Transfer</a></span></span>
43
+ &raquo;
44
+ <span class="title">Controller</span>
45
+
46
+ </div>
47
+
48
+ <div id="search">
49
+
50
+ <a class="full_list_link" id="class_list_link"
51
+ href="../../class_list.html">
52
+
53
+ <svg width="24" height="24">
54
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
55
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
56
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
57
+ </svg>
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <div id="content"><h1>Class: Files::Transfer::Controller
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">Object</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">Files::Transfer::Controller</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/files.com/transfer/controller.rb
100
+ </dd>
101
+ </dl>
102
+
103
+ </div>
104
+
105
+ <h2>Overview</h2><div class="docstring">
106
+ <div class="discussion">
107
+ <p>Decides how many requests to one destination may be in flight at once, from those requests' own completions.</p>
108
+ <p>It measures in windows. A window closes once it has accepted at least max(window attempts, limit) attempts and
109
+ lasted at least their mean duration, and is judged only when its requests on the network averaged at least 75% of
110
+ the limit, so a transfer short of work, or waiting on the API, its source, admission or memory, teaches it
111
+ nothing. A window's throughput is its accepted bytes over its wall time; its latency L is its attempts' summed
112
+ durations over those bytes; Lmin is the lowest L of any window; and with I requests on the network on average,
113
+ its queue estimate is Q = I * (1 - Lmin / L). An accepted attempt counts in the window it finishes in, whichever
114
+ epoch it was sent in, except during a throttle's cooldown.</p>
115
+ <p>A policy with a warm start begins below its start. Its first judged window warms the connection and its next sets
116
+ the baseline. From a baseline that is not already queued it probes upward, adding ceil(n / 2) to n, or 1 after a
117
+ rest. The attempts in flight once the raised target first fills are the probe's cohort, known by their sequence
118
+ numbers; the probe is judged by the first window opened after the last of them ends, however it ended, or by the
119
+ window then closing once max(window attempts, target) answers have arrived since the raise, whichever comes
120
+ first. It is kept when that window's throughput reaches the baseline's times 1 + 0.5 * d / n and its warm queue
121
+ estimate, I * (1 - reference median / its median), stays under d / 2, and the next probe follows. Medians are of
122
+ each accepted attempt's duration per byte, so windows whose attempts carry different sizes compare alike, and the
123
+ reference median is the fastest judged at the target the probe came from (at a baseline's own target, for a
124
+ baseline). A rejected probe returns to n and rests HOLD_WINDOWS + GROWTH_INTERVAL_WINDOWS judged windows of
125
+ ordinary size, as a queued baseline does; the last of them is the next baseline. Warming goes on so below the
126
+ start: it ends there, or at once on a judged window of 96 MiB/s or more. A failure or throttle in any epoch
127
+ abandons the probe and starts the rest again, at whatever target its shrink left, down to one. The warming window
128
+ and the windows before a cohort settles close after target answers; a baseline's or a probe's window after the
129
+ answers the sampling rule below asks for, though one at 96 MiB/s closes after target answers.</p>
130
+ <p>After that, each judged window grows the limit by the growth step (1 at or above soft) as a probe, keeps a probe
131
+ whose window beats the one before by 1%, and gives it up after two windows that do not, holding a window. Q at
132
+ queue_suppress stops growth, and at queue_backoff shrinks the limit by 8%, not below the latency floor.</p>
133
+ <p>An attempt counts against the limit from when it is admitted (admit), but is on the network, and measured, only
134
+ from when the transport starts sending it (sending) until it is answered (answered): an upload's attempt as its
135
+ response headers arrive, a download's once its whole body has arrived and been checked. Waiting for a worker,
136
+ reading a part's bytes before the send, writing to the destination and settling the outcome afterwards are not
137
+ network time. Each attempt carries the epoch it was sent in, and every change of limit starts a new one. A failure
138
+ shrinks the limit by 35% and a throttle by 10%, only for an attempt from the current epoch; every throttle also
139
+ starts or extends a cooldown, during which completions are not measured, and restarts measurement, but only a
140
+ change of limit starts a new epoch, so a throttle from an older one leaves the newer attempts' failures counting.
141
+ A throttle's Retry-After holds its destination back through the job (Holds), whatever controller its requests
142
+ use. A fixed policy never changes its limit. Its methods lock the controller, so any thread may call them.</p>
143
+
144
+ </div>
145
+ </div>
146
+ <div class="tags">
147
+
148
+
149
+ </div><h2>Defined Under Namespace</h2>
150
+ <p class="children">
151
+
152
+
153
+
154
+
155
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Controller/Attempt.html" title="Files::Transfer::Controller::Attempt (class)">Attempt</a></span>
156
+
157
+
158
+ </p>
159
+
160
+
161
+ <h2>
162
+ Constant Summary
163
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
164
+ </h2>
165
+
166
+ <dl class="constants">
167
+
168
+ <dt id="MAX_DECISIONS-constant" class="">MAX_DECISIONS =
169
+
170
+ </dt>
171
+ <dd><pre class="code"><span class='int'>256</span></pre></dd>
172
+
173
+ <dt id="MAX_SAMPLES-constant" class="">MAX_SAMPLES =
174
+
175
+ </dt>
176
+ <dd><pre class="code"><span class='int'>1024</span></pre></dd>
177
+
178
+ </dl>
179
+
180
+
181
+
182
+
183
+
184
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
185
+ <ul class="summary">
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#policy-instance_method" title="#policy (instance method)">#<strong>policy</strong> &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+ <span class="note title readonly">readonly</span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute policy.</p></div></span>
210
+
211
+ </li>
212
+
213
+
214
+ </ul>
215
+
216
+
217
+
218
+
219
+
220
+ <h2>
221
+ Instance Method Summary
222
+ <small><a href="#" class="summary_toggle">collapse</a></small>
223
+ </h2>
224
+
225
+ <ul class="summary">
226
+
227
+ <li class="public ">
228
+ <span class="summary_signature">
229
+
230
+ <a href="#admit-instance_method" title="#admit (instance method)">#<strong>admit</strong> &#x21d2; Object </a>
231
+
232
+
233
+
234
+ </span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'><p>Counts an attempt against the limit from now, before it is sent, with the next sequence number; sending, answered and finish_attempt take what it returns.</p></div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#admitted-instance_method" title="#admitted (instance method)">#<strong>admitted</strong> &#x21d2; Object </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'><p>Attempts admitted and not yet finished, sent or not: what the limit bounds.</p></div></span>
267
+
268
+ </li>
269
+
270
+
271
+ <li class="public ">
272
+ <span class="summary_signature">
273
+
274
+ <a href="#answered-instance_method" title="#answered (instance method)">#<strong>answered</strong>(attempt) &#x21d2; Object </a>
275
+
276
+
277
+
278
+ </span>
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <span class="summary_desc"><div class='inline'><p>As attempt is answered, an upload's as its response headers arrive and a download's once its whole body has arrived and been checked: it is no longer on the network from now.</p></div></span>
289
+
290
+ </li>
291
+
292
+
293
+ <li class="public ">
294
+ <span class="summary_signature">
295
+
296
+ <a href="#decisions-instance_method" title="#decisions (instance method)">#<strong>decisions</strong> &#x21d2; Object </a>
297
+
298
+
299
+
300
+ </span>
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+ <span class="summary_desc"><div class='inline'><p>Its decisions, oldest first and at most the last 256, each a frozen Hash of :at (its clock's seconds), :phase, :from, :to and :reason.</p></div></span>
311
+
312
+ </li>
313
+
314
+
315
+ <li class="public ">
316
+ <span class="summary_signature">
317
+
318
+ <a href="#finish_attempt-instance_method" title="#finish_attempt (instance method)">#<strong>finish_attempt</strong>(attempt, outcome, bytes: 0, retry_after: nil) &#x21d2; Object </a>
319
+
320
+
321
+
322
+ </span>
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <span class="summary_desc"><div class='inline'><p>outcome is :success, with the bytes the attempt carried; :failure, for an error worth retrying; :throttle, for a 429 or 503, with its Retry-After seconds; or :ignored, for what says nothing about capacity, such as a cancellation, a refused or expired request or the caller's source or callback failing.</p></div></span>
333
+
334
+ </li>
335
+
336
+
337
+ <li class="public ">
338
+ <span class="summary_signature">
339
+
340
+ <a href="#inflight-instance_method" title="#inflight (instance method)">#<strong>inflight</strong> &#x21d2; Object </a>
341
+
342
+
343
+
344
+ </span>
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <span class="summary_desc"><div class='inline'><p>Attempts on the network now: from the start of their send until they are answered (see answered).</p></div></span>
355
+
356
+ </li>
357
+
358
+
359
+ <li class="public ">
360
+ <span class="summary_signature">
361
+
362
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(policy, clock: Clock) &#x21d2; Controller </a>
363
+
364
+
365
+
366
+ </span>
367
+
368
+
369
+ <span class="note title constructor">constructor</span>
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ <span class="summary_desc"><div class='inline'><p>A new instance of Controller.</p></div></span>
379
+
380
+ </li>
381
+
382
+
383
+ <li class="public ">
384
+ <span class="summary_signature">
385
+
386
+ <a href="#limit-instance_method" title="#limit (instance method)">#<strong>limit</strong> &#x21d2; Object </a>
387
+
388
+
389
+
390
+ </span>
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+ <span class="summary_desc"><div class='inline'></div></span>
401
+
402
+ </li>
403
+
404
+
405
+ <li class="public ">
406
+ <span class="summary_signature">
407
+
408
+ <a href="#phase-instance_method" title="#phase (instance method)">#<strong>phase</strong> &#x21d2; Object </a>
409
+
410
+
411
+
412
+ </span>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <span class="summary_desc"><div class='inline'></div></span>
423
+
424
+ </li>
425
+
426
+
427
+ <li class="public ">
428
+ <span class="summary_signature">
429
+
430
+ <a href="#sending-instance_method" title="#sending (instance method)">#<strong>sending</strong>(attempt) &#x21d2; Object </a>
431
+
432
+
433
+
434
+ </span>
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+ <span class="summary_desc"><div class='inline'><p>As the transport starts sending attempt, connection setup included: it is in flight, in the current epoch, from now.</p></div></span>
445
+
446
+ </li>
447
+
448
+
449
+ <li class="public ">
450
+ <span class="summary_signature">
451
+
452
+ <a href="#snapshot-instance_method" title="#snapshot (instance method)">#<strong>snapshot</strong> &#x21d2; Object </a>
453
+
454
+
455
+
456
+ </span>
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+ <span class="summary_desc"><div class='inline'><p>Its policy, phase, limit, attempts admitted, attempts on the network (inflight) and epoch, with how many measurement windows it judged and how many it closed without judging because too few requests were on the network (judged_windows and ineligible_windows).</p></div></span>
467
+
468
+ </li>
469
+
470
+
471
+ <li class="public ">
472
+ <span class="summary_signature">
473
+
474
+ <a href="#start_attempt-instance_method" title="#start_attempt (instance method)">#<strong>start_attempt</strong> &#x21d2; Object </a>
475
+
476
+
477
+
478
+ </span>
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+ <span class="summary_desc"><div class='inline'><p>Admits an attempt and starts sending it at once.</p></div></span>
489
+
490
+ </li>
491
+
492
+
493
+ </ul>
494
+
495
+
496
+
497
+ <div id="constructor_details" class="method_details_list">
498
+ <h2>Constructor Details</h2>
499
+
500
+ <div class="method_details first">
501
+ <h3 class="signature first" id="initialize-instance_method">
502
+
503
+ #<strong>initialize</strong>(policy, clock: Clock) &#x21d2; <tt><span class='object_link'><a href="" title="Files::Transfer::Controller (class)">Controller</a></span></tt>
504
+
505
+
506
+
507
+
508
+
509
+ </h3><div class="docstring">
510
+ <div class="discussion">
511
+ <p>Returns a new instance of Controller.</p>
512
+
513
+ </div>
514
+ </div>
515
+ <div class="tags">
516
+
517
+
518
+ </div><table class="source_code">
519
+ <tr>
520
+ <td>
521
+ <pre class="lines">
522
+
523
+
524
+ 52
525
+ 53
526
+ 54
527
+ 55
528
+ 56
529
+ 57
530
+ 58
531
+ 59
532
+ 60
533
+ 61
534
+ 62
535
+ 63
536
+ 64
537
+ 65
538
+ 66
539
+ 67
540
+ 68
541
+ 69
542
+ 70
543
+ 71
544
+ 72
545
+ 73
546
+ 74
547
+ 75
548
+ 76
549
+ 77
550
+ 78
551
+ 79
552
+ 80
553
+ 81
554
+ 82
555
+ 83
556
+ 84
557
+ 85
558
+ 86
559
+ 87
560
+ 88
561
+ 89
562
+ 90
563
+ 91</pre>
564
+ </td>
565
+ <td>
566
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 52</span>
567
+
568
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_policy'>policy</span><span class='comma'>,</span> <span class='label'>clock:</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='rparen'>)</span>
569
+ <span class='ivar'>@policy</span> <span class='op'>=</span> <span class='id identifier rubyid_policy'>policy</span>
570
+ <span class='ivar'>@clock</span> <span class='op'>=</span> <span class='id identifier rubyid_clock'>clock</span>
571
+ <span class='ivar'>@lock</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
572
+ <span class='ivar'>@limit</span> <span class='op'>=</span> <span class='id identifier rubyid_policy'>policy</span><span class='period'>.</span><span class='id identifier rubyid_initial'>initial</span>
573
+ <span class='ivar'>@phase</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_policy'>policy</span><span class='period'>.</span><span class='id identifier rubyid_fixed?'>fixed?</span>
574
+ <span class='symbol'>:fixed</span>
575
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_policy'>policy</span><span class='period'>.</span><span class='id identifier rubyid_warm?'>warm?</span>
576
+ <span class='symbol'>:warm</span>
577
+ <span class='kw'>else</span>
578
+ <span class='symbol'>:ordinary</span>
579
+ <span class='kw'>end</span>
580
+ <span class='comment'># While warming: :warming, :baseline, :settling (a probe&#39;s cohort is still running), :probing or :resting.
581
+ </span> <span class='ivar'>@stage</span> <span class='op'>=</span> <span class='symbol'>:warming</span>
582
+ <span class='ivar'>@epoch</span> <span class='op'>=</span> <span class='int'>0</span>
583
+ <span class='ivar'>@sequence</span> <span class='op'>=</span> <span class='int'>0</span>
584
+ <span class='ivar'>@admitted</span> <span class='op'>=</span> <span class='int'>0</span>
585
+ <span class='ivar'>@inflight</span> <span class='op'>=</span> <span class='int'>0</span>
586
+ <span class='comment'># Sequence numbers of the attempts admitted and not yet finished.
587
+ </span> <span class='ivar'>@outstanding</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
588
+ <span class='ivar'>@cohort</span> <span class='op'>=</span> <span class='kw'>nil</span>
589
+ <span class='ivar'>@answers</span> <span class='op'>=</span> <span class='int'>0</span>
590
+ <span class='ivar'>@warm_spread</span> <span class='op'>=</span> <span class='float'>0.0</span>
591
+ <span class='ivar'>@warm_degrees</span> <span class='op'>=</span> <span class='int'>0</span>
592
+ <span class='ivar'>@warm_medians</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
593
+ <span class='ivar'>@cooldown_until</span> <span class='op'>=</span> <span class='kw'>nil</span>
594
+ <span class='ivar'>@latency_min</span> <span class='op'>=</span> <span class='kw'>nil</span>
595
+ <span class='ivar'>@decisions</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
596
+ <span class='ivar'>@warm_target</span> <span class='op'>=</span> <span class='int'>2</span>
597
+ <span class='ivar'>@warm_probe</span> <span class='op'>=</span> <span class='kw'>nil</span>
598
+ <span class='ivar'>@rest_windows</span> <span class='op'>=</span> <span class='int'>0</span>
599
+ <span class='ivar'>@rested</span> <span class='op'>=</span> <span class='kw'>false</span>
600
+ <span class='ivar'>@probe</span> <span class='op'>=</span> <span class='kw'>nil</span>
601
+ <span class='ivar'>@hold_windows</span> <span class='op'>=</span> <span class='int'>0</span>
602
+ <span class='ivar'>@judged_windows</span> <span class='op'>=</span> <span class='int'>0</span>
603
+ <span class='ivar'>@ineligible_windows</span> <span class='op'>=</span> <span class='int'>0</span>
604
+ <span class='id identifier rubyid_now'>now</span> <span class='op'>=</span> <span class='ivar'>@clock</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
605
+ <span class='id identifier rubyid_reset_window'>reset_window</span><span class='lparen'>(</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
606
+ <span class='id identifier rubyid_record'>record</span><span class='lparen'>(</span><span class='id identifier rubyid_now'>now</span><span class='comma'>,</span> <span class='symbol'>:start</span><span class='comma'>,</span> <span class='ivar'>@limit</span><span class='rparen'>)</span>
607
+ <span class='kw'>end</span></pre>
608
+ </td>
609
+ </tr>
610
+ </table>
611
+ </div>
612
+
613
+ </div>
614
+
615
+ <div id="instance_attr_details" class="attr_details">
616
+ <h2>Instance Attribute Details</h2>
617
+
618
+
619
+ <span id=""></span>
620
+ <div class="method_details first">
621
+ <h3 class="signature first" id="policy-instance_method">
622
+
623
+ #<strong>policy</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
624
+
625
+
626
+
627
+
628
+
629
+ </h3><div class="docstring">
630
+ <div class="discussion">
631
+ <p>Returns the value of attribute policy.</p>
632
+
633
+ </div>
634
+ </div>
635
+ <div class="tags">
636
+
637
+
638
+ </div><table class="source_code">
639
+ <tr>
640
+ <td>
641
+ <pre class="lines">
642
+
643
+
644
+ 50
645
+ 51
646
+ 52</pre>
647
+ </td>
648
+ <td>
649
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 50</span>
650
+
651
+ <span class='kw'>def</span> <span class='id identifier rubyid_policy'>policy</span>
652
+ <span class='ivar'>@policy</span>
653
+ <span class='kw'>end</span></pre>
654
+ </td>
655
+ </tr>
656
+ </table>
657
+ </div>
658
+
659
+ </div>
660
+
661
+
662
+ <div id="instance_method_details" class="method_details_list">
663
+ <h2>Instance Method Details</h2>
664
+
665
+
666
+ <div class="method_details first">
667
+ <h3 class="signature first" id="admit-instance_method">
668
+
669
+ #<strong>admit</strong> &#x21d2; <tt>Object</tt>
670
+
671
+
672
+
673
+
674
+
675
+ </h3><div class="docstring">
676
+ <div class="discussion">
677
+ <p>Counts an attempt against the limit from now, before it is sent, with the next sequence number; sending,
678
+ answered and finish_attempt take what it returns.</p>
679
+
680
+ </div>
681
+ </div>
682
+ <div class="tags">
683
+
684
+
685
+ </div><table class="source_code">
686
+ <tr>
687
+ <td>
688
+ <pre class="lines">
689
+
690
+
691
+ 129
692
+ 130
693
+ 131
694
+ 132
695
+ 133
696
+ 134
697
+ 135
698
+ 136
699
+ 137</pre>
700
+ </td>
701
+ <td>
702
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 129</span>
703
+
704
+ <span class='kw'>def</span> <span class='id identifier rubyid_admit'>admit</span>
705
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
706
+ <span class='ivar'>@admitted</span> <span class='op'>+=</span> <span class='int'>1</span>
707
+ <span class='id identifier rubyid_attempt'>attempt</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Controller/Attempt.html" title="Files::Transfer::Controller::Attempt (class)">Attempt</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Files::Transfer::Controller#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@sequence</span> <span class='op'>+=</span> <span class='int'>1</span><span class='rparen'>)</span>
708
+ <span class='ivar'>@outstanding</span><span class='lbracket'>[</span><span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_sequence'>sequence</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
709
+ <span class='id identifier rubyid_note_cohort'>note_cohort</span>
710
+ <span class='id identifier rubyid_attempt'>attempt</span>
711
+ <span class='kw'>end</span>
712
+ <span class='kw'>end</span></pre>
713
+ </td>
714
+ </tr>
715
+ </table>
716
+ </div>
717
+
718
+ <div class="method_details ">
719
+ <h3 class="signature " id="admitted-instance_method">
720
+
721
+ #<strong>admitted</strong> &#x21d2; <tt>Object</tt>
722
+
723
+
724
+
725
+
726
+
727
+ </h3><div class="docstring">
728
+ <div class="discussion">
729
+ <p>Attempts admitted and not yet finished, sent or not: what the limit bounds.</p>
730
+
731
+ </div>
732
+ </div>
733
+ <div class="tags">
734
+
735
+
736
+ </div><table class="source_code">
737
+ <tr>
738
+ <td>
739
+ <pre class="lines">
740
+
741
+
742
+ 103
743
+ 104
744
+ 105</pre>
745
+ </td>
746
+ <td>
747
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 103</span>
748
+
749
+ <span class='kw'>def</span> <span class='id identifier rubyid_admitted'>admitted</span>
750
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@admitted</span> <span class='rbrace'>}</span>
751
+ <span class='kw'>end</span></pre>
752
+ </td>
753
+ </tr>
754
+ </table>
755
+ </div>
756
+
757
+ <div class="method_details ">
758
+ <h3 class="signature " id="answered-instance_method">
759
+
760
+ #<strong>answered</strong>(attempt) &#x21d2; <tt>Object</tt>
761
+
762
+
763
+
764
+
765
+
766
+ </h3><div class="docstring">
767
+ <div class="discussion">
768
+ <p>As attempt is answered, an upload's as its response headers arrive and a download's once its whole body has
769
+ arrived and been checked: it is no longer on the network from now. Only the first call counts.</p>
770
+
771
+ </div>
772
+ </div>
773
+ <div class="tags">
774
+
775
+
776
+ </div><table class="source_code">
777
+ <tr>
778
+ <td>
779
+ <pre class="lines">
780
+
781
+
782
+ 155
783
+ 156
784
+ 157</pre>
785
+ </td>
786
+ <td>
787
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 155</span>
788
+
789
+ <span class='kw'>def</span> <span class='id identifier rubyid_answered'>answered</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
790
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_answer'>answer</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='ivar'>@clock</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
791
+ <span class='kw'>end</span></pre>
792
+ </td>
793
+ </tr>
794
+ </table>
795
+ </div>
796
+
797
+ <div class="method_details ">
798
+ <h3 class="signature " id="decisions-instance_method">
799
+
800
+ #<strong>decisions</strong> &#x21d2; <tt>Object</tt>
801
+
802
+
803
+
804
+
805
+
806
+ </h3><div class="docstring">
807
+ <div class="discussion">
808
+ <p>Its decisions, oldest first and at most the last 256, each a frozen Hash of :at (its clock's seconds),
809
+ :phase, :from, :to and :reason.</p>
810
+
811
+ </div>
812
+ </div>
813
+ <div class="tags">
814
+
815
+
816
+ </div><table class="source_code">
817
+ <tr>
818
+ <td>
819
+ <pre class="lines">
820
+
821
+
822
+ 113
823
+ 114
824
+ 115</pre>
825
+ </td>
826
+ <td>
827
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 113</span>
828
+
829
+ <span class='kw'>def</span> <span class='id identifier rubyid_decisions'>decisions</span>
830
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@decisions</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='rbrace'>}</span>
831
+ <span class='kw'>end</span></pre>
832
+ </td>
833
+ </tr>
834
+ </table>
835
+ </div>
836
+
837
+ <div class="method_details ">
838
+ <h3 class="signature " id="finish_attempt-instance_method">
839
+
840
+ #<strong>finish_attempt</strong>(attempt, outcome, bytes: 0, retry_after: nil) &#x21d2; <tt>Object</tt>
841
+
842
+
843
+
844
+
845
+
846
+ </h3><div class="docstring">
847
+ <div class="discussion">
848
+ <p>outcome is :success, with the bytes the attempt carried; :failure, for an error worth retrying; :throttle, for
849
+ a 429 or 503, with its Retry-After seconds; or :ignored, for what says nothing about capacity, such as a
850
+ cancellation, a refused or expired request or the caller's source or callback failing. An attempt never sent
851
+ teaches nothing, but every attempt ending counts toward settling a probe's cohort. Returns the limit.</p>
852
+
853
+ </div>
854
+ </div>
855
+ <div class="tags">
856
+
857
+
858
+ </div><table class="source_code">
859
+ <tr>
860
+ <td>
861
+ <pre class="lines">
862
+
863
+
864
+ 170
865
+ 171
866
+ 172
867
+ 173
868
+ 174
869
+ 175
870
+ 176
871
+ 177
872
+ 178
873
+ 179
874
+ 180
875
+ 181
876
+ 182
877
+ 183
878
+ 184
879
+ 185
880
+ 186
881
+ 187</pre>
882
+ </td>
883
+ <td>
884
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 170</span>
885
+
886
+ <span class='kw'>def</span> <span class='id identifier rubyid_finish_attempt'>finish_attempt</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_outcome'>outcome</span><span class='comma'>,</span> <span class='label'>bytes:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>retry_after:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
887
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
888
+ <span class='id identifier rubyid_now'>now</span> <span class='op'>=</span> <span class='ivar'>@clock</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
889
+ <span class='id identifier rubyid_answer'>answer</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
890
+ <span class='id identifier rubyid_advance'>advance</span><span class='lparen'>(</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
891
+ <span class='ivar'>@admitted</span> <span class='op'>-=</span> <span class='int'>1</span>
892
+ <span class='ivar'>@outstanding</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_sequence'>sequence</span><span class='rparen'>)</span>
893
+ <span class='kw'>if</span> <span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_started_at'>started_at</span>
894
+ <span class='kw'>case</span> <span class='id identifier rubyid_outcome'>outcome</span>
895
+ <span class='kw'>when</span> <span class='symbol'>:success</span> <span class='kw'>then</span> <span class='id identifier rubyid_measure'>measure</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='comma'>,</span> <span class='id identifier rubyid_bytes'>bytes</span><span class='rparen'>)</span>
896
+ <span class='kw'>when</span> <span class='symbol'>:failure</span> <span class='kw'>then</span> <span class='id identifier rubyid_failed'>failed</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
897
+ <span class='kw'>when</span> <span class='symbol'>:throttle</span> <span class='kw'>then</span> <span class='id identifier rubyid_throttled'>throttled</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='comma'>,</span> <span class='id identifier rubyid_retry_after'>retry_after</span><span class='rparen'>)</span>
898
+ <span class='kw'>end</span>
899
+ <span class='kw'>end</span>
900
+ <span class='id identifier rubyid_settle_cohort'>settle_cohort</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
901
+ <span class='ivar'>@limit</span>
902
+ <span class='kw'>end</span>
903
+ <span class='kw'>end</span></pre>
904
+ </td>
905
+ </tr>
906
+ </table>
907
+ </div>
908
+
909
+ <div class="method_details ">
910
+ <h3 class="signature " id="inflight-instance_method">
911
+
912
+ #<strong>inflight</strong> &#x21d2; <tt>Object</tt>
913
+
914
+
915
+
916
+
917
+
918
+ </h3><div class="docstring">
919
+ <div class="discussion">
920
+ <p>Attempts on the network now: from the start of their send until they are answered (see answered).</p>
921
+
922
+ </div>
923
+ </div>
924
+ <div class="tags">
925
+
926
+
927
+ </div><table class="source_code">
928
+ <tr>
929
+ <td>
930
+ <pre class="lines">
931
+
932
+
933
+ 98
934
+ 99
935
+ 100</pre>
936
+ </td>
937
+ <td>
938
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 98</span>
939
+
940
+ <span class='kw'>def</span> <span class='id identifier rubyid_inflight'>inflight</span>
941
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@inflight</span> <span class='rbrace'>}</span>
942
+ <span class='kw'>end</span></pre>
943
+ </td>
944
+ </tr>
945
+ </table>
946
+ </div>
947
+
948
+ <div class="method_details ">
949
+ <h3 class="signature " id="limit-instance_method">
950
+
951
+ #<strong>limit</strong> &#x21d2; <tt>Object</tt>
952
+
953
+
954
+
955
+
956
+
957
+ </h3><table class="source_code">
958
+ <tr>
959
+ <td>
960
+ <pre class="lines">
961
+
962
+
963
+ 93
964
+ 94
965
+ 95</pre>
966
+ </td>
967
+ <td>
968
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 93</span>
969
+
970
+ <span class='kw'>def</span> <span class='id identifier rubyid_limit'>limit</span>
971
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@limit</span> <span class='rbrace'>}</span>
972
+ <span class='kw'>end</span></pre>
973
+ </td>
974
+ </tr>
975
+ </table>
976
+ </div>
977
+
978
+ <div class="method_details ">
979
+ <h3 class="signature " id="phase-instance_method">
980
+
981
+ #<strong>phase</strong> &#x21d2; <tt>Object</tt>
982
+
983
+
984
+
985
+
986
+
987
+ </h3><table class="source_code">
988
+ <tr>
989
+ <td>
990
+ <pre class="lines">
991
+
992
+
993
+ 107
994
+ 108
995
+ 109</pre>
996
+ </td>
997
+ <td>
998
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 107</span>
999
+
1000
+ <span class='kw'>def</span> <span class='id identifier rubyid_phase'>phase</span>
1001
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@phase</span> <span class='rbrace'>}</span>
1002
+ <span class='kw'>end</span></pre>
1003
+ </td>
1004
+ </tr>
1005
+ </table>
1006
+ </div>
1007
+
1008
+ <div class="method_details ">
1009
+ <h3 class="signature " id="sending-instance_method">
1010
+
1011
+ #<strong>sending</strong>(attempt) &#x21d2; <tt>Object</tt>
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+ </h3><div class="docstring">
1018
+ <div class="discussion">
1019
+ <p>As the transport starts sending attempt, connection setup included: it is in flight, in the current epoch, from
1020
+ now.</p>
1021
+
1022
+ </div>
1023
+ </div>
1024
+ <div class="tags">
1025
+
1026
+
1027
+ </div><table class="source_code">
1028
+ <tr>
1029
+ <td>
1030
+ <pre class="lines">
1031
+
1032
+
1033
+ 141
1034
+ 142
1035
+ 143
1036
+ 144
1037
+ 145
1038
+ 146
1039
+ 147
1040
+ 148
1041
+ 149
1042
+ 150
1043
+ 151</pre>
1044
+ </td>
1045
+ <td>
1046
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 141</span>
1047
+
1048
+ <span class='kw'>def</span> <span class='id identifier rubyid_sending'>sending</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
1049
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
1050
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_started_at'>started_at</span>
1051
+
1052
+ <span class='id identifier rubyid_now'>now</span> <span class='op'>=</span> <span class='ivar'>@clock</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
1053
+ <span class='id identifier rubyid_advance'>advance</span><span class='lparen'>(</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
1054
+ <span class='ivar'>@inflight</span> <span class='op'>+=</span> <span class='int'>1</span>
1055
+ <span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_epoch'>epoch</span> <span class='op'>=</span> <span class='ivar'>@epoch</span>
1056
+ <span class='id identifier rubyid_attempt'>attempt</span><span class='period'>.</span><span class='id identifier rubyid_started_at'>started_at</span> <span class='op'>=</span> <span class='id identifier rubyid_now'>now</span>
1057
+ <span class='kw'>end</span>
1058
+ <span class='kw'>end</span></pre>
1059
+ </td>
1060
+ </tr>
1061
+ </table>
1062
+ </div>
1063
+
1064
+ <div class="method_details ">
1065
+ <h3 class="signature " id="snapshot-instance_method">
1066
+
1067
+ #<strong>snapshot</strong> &#x21d2; <tt>Object</tt>
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+ </h3><div class="docstring">
1074
+ <div class="discussion">
1075
+ <p>Its policy, phase, limit, attempts admitted, attempts on the network (inflight) and epoch, with how many
1076
+ measurement windows it judged and how many it closed without judging because too few requests were on the
1077
+ network (judged_windows and ineligible_windows).</p>
1078
+
1079
+ </div>
1080
+ </div>
1081
+ <div class="tags">
1082
+
1083
+
1084
+ </div><table class="source_code">
1085
+ <tr>
1086
+ <td>
1087
+ <pre class="lines">
1088
+
1089
+
1090
+ 120
1091
+ 121
1092
+ 122
1093
+ 123
1094
+ 124
1095
+ 125</pre>
1096
+ </td>
1097
+ <td>
1098
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 120</span>
1099
+
1100
+ <span class='kw'>def</span> <span class='id identifier rubyid_snapshot'>snapshot</span>
1101
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
1102
+ <span class='lbrace'>{</span> <span class='label'>policy:</span> <span class='ivar'>@policy</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>phase:</span> <span class='ivar'>@phase</span><span class='comma'>,</span> <span class='label'>limit:</span> <span class='ivar'>@limit</span><span class='comma'>,</span> <span class='label'>admitted:</span> <span class='ivar'>@admitted</span><span class='comma'>,</span> <span class='label'>inflight:</span> <span class='ivar'>@inflight</span><span class='comma'>,</span> <span class='label'>epoch:</span> <span class='ivar'>@epoch</span><span class='comma'>,</span>
1103
+ <span class='label'>judged_windows:</span> <span class='ivar'>@judged_windows</span><span class='comma'>,</span> <span class='label'>ineligible_windows:</span> <span class='ivar'>@ineligible_windows</span> <span class='rbrace'>}</span>
1104
+ <span class='kw'>end</span>
1105
+ <span class='kw'>end</span></pre>
1106
+ </td>
1107
+ </tr>
1108
+ </table>
1109
+ </div>
1110
+
1111
+ <div class="method_details ">
1112
+ <h3 class="signature " id="start_attempt-instance_method">
1113
+
1114
+ #<strong>start_attempt</strong> &#x21d2; <tt>Object</tt>
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+ </h3><div class="docstring">
1121
+ <div class="discussion">
1122
+ <p>Admits an attempt and starts sending it at once.</p>
1123
+
1124
+ </div>
1125
+ </div>
1126
+ <div class="tags">
1127
+
1128
+
1129
+ </div><table class="source_code">
1130
+ <tr>
1131
+ <td>
1132
+ <pre class="lines">
1133
+
1134
+
1135
+ 160
1136
+ 161
1137
+ 162
1138
+ 163
1139
+ 164</pre>
1140
+ </td>
1141
+ <td>
1142
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/controller.rb', line 160</span>
1143
+
1144
+ <span class='kw'>def</span> <span class='id identifier rubyid_start_attempt'>start_attempt</span>
1145
+ <span class='id identifier rubyid_attempt'>attempt</span> <span class='op'>=</span> <span class='id identifier rubyid_admit'>admit</span>
1146
+ <span class='id identifier rubyid_sending'>sending</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
1147
+ <span class='id identifier rubyid_attempt'>attempt</span>
1148
+ <span class='kw'>end</span></pre>
1149
+ </td>
1150
+ </tr>
1151
+ </table>
1152
+ </div>
1153
+
1154
+ </div>
1155
+
1156
+ </div>
1157
+
1158
+ <div id="footer">
1159
+ Generated on Tue Nov 3 18:04:10 2026 by
1160
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1161
+ 0.9.45 (ruby-4.0.9).
1162
+ </div>
1163
+
1164
+ </div>
1165
+ </body>
1166
+ </html>