files.com 1.1.813 → 1.1.815

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 (465) 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 +911 -731
  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 +597 -386
  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 +5368 -3048
  435. data/doc/top-level-namespace.html +1 -1
  436. data/docs/file.md +346 -0
  437. data/docs/site.md +10 -0
  438. data/docs/user.md +8 -0
  439. data/lib/files.com/api.rb +6 -1
  440. data/lib/files.com/api_client.rb +220 -32
  441. data/lib/files.com/models/file.rb +124 -17
  442. data/lib/files.com/models/site.rb +16 -0
  443. data/lib/files.com/models/user.rb +19 -0
  444. data/lib/files.com/transfer/budgets.rb +123 -0
  445. data/lib/files.com/transfer/checkpoint.rb +113 -0
  446. data/lib/files.com/transfer/clock.rb +14 -0
  447. data/lib/files.com/transfer/controller.rb +549 -0
  448. data/lib/files.com/transfer/download_coordinator.rb +906 -0
  449. data/lib/files.com/transfer/errors.rb +100 -0
  450. data/lib/files.com/transfer/http_transport.rb +337 -0
  451. data/lib/files.com/transfer/job.rb +778 -0
  452. data/lib/files.com/transfer/options.rb +126 -0
  453. data/lib/files.com/transfer/policy.rb +91 -0
  454. data/lib/files.com/transfer/storage_retry.rb +169 -0
  455. data/lib/files.com/transfer/upload_coordinator.rb +657 -0
  456. data/lib/files.com/transfer/upload_plan.rb +157 -0
  457. data/lib/files.com.rb +13 -0
  458. data/spec/lib/api_client_spec.rb +125 -3
  459. data/spec/models/file_transfer_spec.rb +53 -4
  460. data/spec/support/transfer_server.rb +113 -14
  461. data/spec/transfer/adaptive_download_spec.rb +1102 -0
  462. data/spec/transfer/adaptive_upload_spec.rb +1602 -0
  463. data/spec/transfer/concurrency_controller_spec.rb +382 -0
  464. data/spec/workspace_id_spec.rb +19 -14
  465. metadata +59 -1
@@ -0,0 +1,2338 @@
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::Job
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::Job";
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 (J)</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">Job</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::Job
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::Job</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/job.rb
100
+ </dd>
101
+ </dl>
102
+
103
+ </div>
104
+
105
+ <h2>Overview</h2><div class="docstring">
106
+ <div class="discussion">
107
+ <p>What adaptive transfers share: their Options, one Controller for each kind of destination with the request limit
108
+ it sets, the request permits, the buffer budget, the file slots, how long a throttle holds each destination back
109
+ (Holds), whichever transfer, transport or controller met it, and the worker threads that send content requests.</p>
110
+ <p>A Hash or true given as transfer: makes a Job for that one call, closed before it returns. Pass a Job instead to
111
+ share it between calls, from any threads: transfers to the same storage then share one controller and what it
112
+ learned, every transfer counts against one buffer_bytes and one request limit (a fixed concurrency, or
113
+ max_concurrency, or 64), and at most max_files run at once. Close it when they are done, or use Job.open with a
114
+ block.</p>
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+ <h2>
124
+ Constant Summary
125
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <dl class="constants">
129
+
130
+ <dt id="CLOSE_WAIT_SECONDS-constant" class="">CLOSE_WAIT_SECONDS =
131
+
132
+ </dt>
133
+ <dd><pre class="code"><span class='int'>5</span></pre></dd>
134
+
135
+ <dt id="MAX_NOTES-constant" class="">MAX_NOTES =
136
+
137
+ </dt>
138
+ <dd><pre class="code"><span class='int'>64</span></pre></dd>
139
+
140
+ <dt id="MAX_WAIT_SECONDS-constant" class="">MAX_WAIT_SECONDS =
141
+ <div class="docstring">
142
+ <div class="discussion">
143
+ <p>The longest a waiting transfer sleeps before it looks at its deadlines again, so a long Retry-After is waited
144
+ out in steps, and a cancellation or pause still ends the wait at once.</p>
145
+
146
+ </div>
147
+ </div>
148
+ <div class="tags">
149
+
150
+
151
+ </div>
152
+ </dt>
153
+ <dd><pre class="code"><span class='float'>60.0</span></pre></dd>
154
+
155
+ </dl>
156
+
157
+
158
+
159
+
160
+
161
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
162
+ <ul class="summary">
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#budget-instance_method" title="#budget (instance method)">#<strong>budget</strong> &#x21d2; Object </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+ <span class="note title readonly">readonly</span>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute budget.</p></div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Object </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+ <span class="note title readonly">readonly</span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute options.</p></div></span>
214
+
215
+ </li>
216
+
217
+
218
+ <li class="public ">
219
+ <span class="summary_signature">
220
+
221
+ <a href="#transport-instance_method" title="#transport (instance method)">#<strong>transport</strong> &#x21d2; Object </a>
222
+
223
+
224
+
225
+ </span>
226
+
227
+
228
+
229
+
230
+ <span class="note title readonly">readonly</span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute transport.</p></div></span>
241
+
242
+ </li>
243
+
244
+
245
+ </ul>
246
+
247
+
248
+
249
+
250
+
251
+ <h2>
252
+ Class Method Summary
253
+ <small><a href="#" class="summary_toggle">collapse</a></small>
254
+ </h2>
255
+
256
+ <ul class="summary">
257
+
258
+ <li class="public ">
259
+ <span class="summary_signature">
260
+
261
+ <a href="#open-class_method" title="open (class method)">.<strong>open</strong>(**options) &#x21d2; Object </a>
262
+
263
+
264
+
265
+ </span>
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <span class="summary_desc"><div class='inline'></div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#using-class_method" title="using (class method)">.<strong>using</strong>(transfer) &#x21d2; Object </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'><p>Runs the block with the Job transfer names: transfer itself, or a new Job closed afterwards.</p></div></span>
298
+
299
+ </li>
300
+
301
+
302
+ </ul>
303
+
304
+
305
+ <h2>
306
+ Instance Method Summary
307
+ <small><a href="#" class="summary_toggle">collapse</a></small>
308
+ </h2>
309
+
310
+ <ul class="summary">
311
+
312
+ <li class="public ">
313
+ <span class="summary_signature">
314
+
315
+ <a href="#acquire_file-instance_method" title="#acquire_file (instance method)">#<strong>acquire_file</strong>(control) &#x21d2; Object </a>
316
+
317
+
318
+
319
+ </span>
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+ <span class="summary_desc"><div class='inline'><p>Waits for a file slot: returns :running once the caller has one, or control's :cancelled or :paused.</p></div></span>
330
+
331
+ </li>
332
+
333
+
334
+ <li class="public ">
335
+ <span class="summary_signature">
336
+
337
+ <a href="#acquire_request-instance_method" title="#acquire_request (instance method)">#<strong>acquire_request</strong>(control, url) &#x21d2; Object </a>
338
+
339
+
340
+
341
+ </span>
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ <span class="summary_desc"><div class='inline'><p>Waits, on a transfer's own thread, for a request permit for a request that thread sends itself to url, once no throttle holds url's destination back: returns :running once it holds one, or control's :cancelled or :paused as soon as it stops.</p></div></span>
352
+
353
+ </li>
354
+
355
+
356
+ <li class="public ">
357
+ <span class="summary_signature">
358
+
359
+ <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong>(strict: true) &#x21d2; Object </a>
360
+
361
+
362
+
363
+ </span>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'><p>Stops the job: transfers still running on it stop with an error, and it waits for them and the requests they have in flight, at most five seconds in all.</p></div></span>
374
+
375
+ </li>
376
+
377
+
378
+ <li class="public ">
379
+ <span class="summary_signature">
380
+
381
+ <a href="#closed%3F-instance_method" title="#closed? (instance method)">#<strong>closed?</strong> &#x21d2; Boolean </a>
382
+
383
+
384
+
385
+ </span>
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+ <span class="summary_desc"><div class='inline'></div></span>
396
+
397
+ </li>
398
+
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
403
+ <a href="#control-instance_method" title="#control (instance method)">#<strong>control</strong> &#x21d2; Object </a>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <span class="summary_desc"><div class='inline'></div></span>
418
+
419
+ </li>
420
+
421
+
422
+ <li class="public ">
423
+ <span class="summary_signature">
424
+
425
+ <a href="#controller-instance_method" title="#controller (instance method)">#<strong>controller</strong>(key) &#x21d2; Object </a>
426
+
427
+
428
+
429
+ </span>
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+ <span class="summary_desc"><div class='inline'><p>With the lock held: the controller for key, made from the policy the block returns the first time.</p></div></span>
440
+
441
+ </li>
442
+
443
+
444
+ <li class="public ">
445
+ <span class="summary_signature">
446
+
447
+ <a href="#count_accepted-instance_method" title="#count_accepted (instance method)">#<strong>count_accepted</strong>(bytes) &#x21d2; Object </a>
448
+
449
+
450
+
451
+ </span>
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+ <span class="summary_desc"><div class='inline'><p>With the lock held: counts bytes accepted for the first time.</p></div></span>
462
+
463
+ </li>
464
+
465
+
466
+ <li class="public ">
467
+ <span class="summary_signature">
468
+
469
+ <a href="#count_retry-instance_method" title="#count_retry (instance method)">#<strong>count_retry</strong> &#x21d2; Object </a>
470
+
471
+
472
+
473
+ </span>
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+ <span class="summary_desc"><div class='inline'><p>With the lock held: counts a request about to be sent again.</p></div></span>
484
+
485
+ </li>
486
+
487
+
488
+ <li class="public ">
489
+ <span class="summary_signature">
490
+
491
+ <a href="#diagnostics-instance_method" title="#diagnostics (instance method)">#<strong>diagnostics</strong> &#x21d2; Object </a>
492
+
493
+
494
+
495
+ </span>
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+ <span class="summary_desc"><div class='inline'><p>A snapshot of how the job's transfers ran:.</p></div></span>
506
+
507
+ </li>
508
+
509
+
510
+ <li class="public ">
511
+ <span class="summary_signature">
512
+
513
+ <a href="#give_request-instance_method" title="#give_request (instance method)">#<strong>give_request</strong> &#x21d2; Object </a>
514
+
515
+
516
+
517
+ </span>
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+ <span class="summary_desc"><div class='inline'><p>With the lock held: gives a worker's request permit back and wakes everything waiting for one.</p></div></span>
528
+
529
+ </li>
530
+
531
+
532
+ <li class="public ">
533
+ <span class="summary_signature">
534
+
535
+ <a href="#held_bytes-instance_method" title="#held_bytes (instance method)">#<strong>held_bytes</strong> &#x21d2; Object </a>
536
+
537
+
538
+
539
+ </span>
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+ <span class="summary_desc"><div class='inline'><p>Bytes held right now for parts waiting to be sent or written.</p></div></span>
550
+
551
+ </li>
552
+
553
+
554
+ <li class="public ">
555
+ <span class="summary_signature">
556
+
557
+ <a href="#held_until-instance_method" title="#held_until (instance method)">#<strong>held_until</strong>(url) &#x21d2; Object </a>
558
+
559
+
560
+
561
+ </span>
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+ <span class="summary_desc"><div class='inline'><p>With the lock held: the monotonic time until which a throttle holds url's destination back, or nil.</p></div></span>
572
+
573
+ </li>
574
+
575
+
576
+ <li class="public ">
577
+ <span class="summary_signature">
578
+
579
+ <a href="#hold-instance_method" title="#hold (instance method)">#<strong>hold</strong>(url, seconds) &#x21d2; Object </a>
580
+
581
+
582
+
583
+ </span>
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+ <span class="summary_desc"><div class='inline'><p>With the lock held: holds url's destination back for seconds, a throttle's Retry-After, from every new request and retry of the job's transfers, unless it already is for longer, and wakes everything waiting.</p></div></span>
594
+
595
+ </li>
596
+
597
+
598
+ <li class="public ">
599
+ <span class="summary_signature">
600
+
601
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = nil, **keywords) &#x21d2; Job </a>
602
+
603
+
604
+
605
+ </span>
606
+
607
+
608
+ <span class="note title constructor">constructor</span>
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+ <span class="summary_desc"><div class='inline'><p>A new instance of Job.</p></div></span>
618
+
619
+ </li>
620
+
621
+
622
+ <li class="public ">
623
+ <span class="summary_signature">
624
+
625
+ <a href="#note-instance_method" title="#note (instance method)">#<strong>note</strong>(message) &#x21d2; Object </a>
626
+
627
+
628
+
629
+ </span>
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ <span class="summary_desc"><div class='inline'><p>With the lock held.</p></div></span>
640
+
641
+ </li>
642
+
643
+
644
+ <li class="public ">
645
+ <span class="summary_signature">
646
+
647
+ <a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong> &#x21d2; Object </a>
648
+
649
+
650
+
651
+ </span>
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+ <span class="summary_desc"><div class='inline'><p>Runs the block under the lock and wakes everything waiting.</p></div></span>
662
+
663
+ </li>
664
+
665
+
666
+ <li class="public ">
667
+ <span class="summary_signature">
668
+
669
+ <a href="#release_file-instance_method" title="#release_file (instance method)">#<strong>release_file</strong> &#x21d2; Object </a>
670
+
671
+
672
+
673
+ </span>
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+ <span class="summary_desc"><div class='inline'></div></span>
684
+
685
+ </li>
686
+
687
+
688
+ <li class="public ">
689
+ <span class="summary_signature">
690
+
691
+ <a href="#release_request-instance_method" title="#release_request (instance method)">#<strong>release_request</strong>(url = nil, seconds = nil) &#x21d2; Object </a>
692
+
693
+
694
+
695
+ </span>
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+ <span class="summary_desc"><div class='inline'><p>Gives back a permit acquire_request took.</p></div></span>
706
+
707
+ </li>
708
+
709
+
710
+ <li class="public ">
711
+ <span class="summary_signature">
712
+
713
+ <a href="#signal-instance_method" title="#signal (instance method)">#<strong>signal</strong> &#x21d2; Object </a>
714
+
715
+
716
+
717
+ </span>
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+ <span class="summary_desc"><div class='inline'><p>With the lock held: wakes everything waiting for a change.</p></div></span>
728
+
729
+ </li>
730
+
731
+
732
+ <li class="public ">
733
+ <span class="summary_signature">
734
+
735
+ <a href="#submit-instance_method" title="#submit (instance method)">#<strong>submit</strong>(&amp;work) &#x21d2; Object </a>
736
+
737
+
738
+
739
+ </span>
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+ <span class="summary_desc"><div class='inline'><p>With the lock held: runs work on a worker thread, which passes it the connections that thread owns.</p></div></span>
750
+
751
+ </li>
752
+
753
+
754
+ <li class="public ">
755
+ <span class="summary_signature">
756
+
757
+ <a href="#synchronize-instance_method" title="#synchronize (instance method)">#<strong>synchronize</strong>(&amp;block) &#x21d2; Object </a>
758
+
759
+
760
+
761
+ </span>
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+ <span class="summary_desc"><div class='inline'></div></span>
772
+
773
+ </li>
774
+
775
+
776
+ <li class="public ">
777
+ <span class="summary_signature">
778
+
779
+ <a href="#take_request-instance_method" title="#take_request (instance method)">#<strong>take_request</strong> &#x21d2; Object </a>
780
+
781
+
782
+
783
+ </span>
784
+
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+ <span class="summary_desc"><div class='inline'><p>With the lock held: takes a request permit for a worker's request when one is free.</p></div></span>
794
+
795
+ </li>
796
+
797
+
798
+ <li class="public ">
799
+ <span class="summary_signature">
800
+
801
+ <a href="#transport_for-instance_method" title="#transport_for (instance method)">#<strong>transport_for</strong>(client, download: false) &#x21d2; Object </a>
802
+
803
+
804
+
805
+ </span>
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+
815
+ <span class="summary_desc"><div class='inline'><p>The transport for a transfer's content requests through client, which the caller's thread resolved: the job's own only when client is the SDK's own kind with its default connection unchanged and the job's own proxy (HttpTransport#compatible?), otherwise client itself, one request at a time.</p></div></span>
816
+
817
+ </li>
818
+
819
+
820
+ <li class="public ">
821
+ <span class="summary_signature">
822
+
823
+ <a href="#wait-instance_method" title="#wait (instance method)">#<strong>wait</strong>(seconds = nil) &#x21d2; Object </a>
824
+
825
+
826
+
827
+ </span>
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+ <span class="summary_desc"><div class='inline'><p>With the lock held: waits for a change, at most seconds when given, and never more than MAX_WAIT_SECONDS at a time when given; the caller looks at its deadline again after it.</p></div></span>
838
+
839
+ </li>
840
+
841
+
842
+ <li class="public ">
843
+ <span class="summary_signature">
844
+
845
+ <a href="#wake-instance_method" title="#wake (instance method)">#<strong>wake</strong> &#x21d2; Object </a>
846
+
847
+
848
+
849
+ </span>
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+ <span class="summary_desc"><div class='inline'><p>Called by the control after it changes.</p></div></span>
860
+
861
+ </li>
862
+
863
+
864
+ </ul>
865
+
866
+
867
+
868
+ <div id="constructor_details" class="method_details_list">
869
+ <h2>Constructor Details</h2>
870
+
871
+ <div class="method_details first">
872
+ <h3 class="signature first" id="initialize-instance_method">
873
+
874
+ #<strong>initialize</strong>(options = nil, **keywords) &#x21d2; <tt><span class='object_link'><a href="" title="Files::Transfer::Job (class)">Job</a></span></tt>
875
+
876
+
877
+
878
+
879
+
880
+ </h3><div class="docstring">
881
+ <div class="discussion">
882
+ <p>Returns a new instance of Job.</p>
883
+
884
+ </div>
885
+ </div>
886
+ <div class="tags">
887
+
888
+
889
+ </div><table class="source_code">
890
+ <tr>
891
+ <td>
892
+ <pre class="lines">
893
+
894
+
895
+ 52
896
+ 53
897
+ 54
898
+ 55
899
+ 56
900
+ 57
901
+ 58
902
+ 59
903
+ 60
904
+ 61
905
+ 62
906
+ 63
907
+ 64
908
+ 65
909
+ 66
910
+ 67
911
+ 68
912
+ 69
913
+ 70
914
+ 71
915
+ 72
916
+ 73
917
+ 74</pre>
918
+ </td>
919
+ <td>
920
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 52</span>
921
+
922
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_keywords'>keywords</span><span class='rparen'>)</span>
923
+ <span class='ivar'>@options</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Options.html" title="Files::Transfer::Options (class)">Options</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from'><span class='object_link'><a href="Options.html#from-class_method" title="Files::Transfer::Options.from (method)">from</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>||</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='rparen'>)</span>
924
+ <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>
925
+ <span class='ivar'>@changed</span> <span class='op'>=</span> <span class='const'>ConditionVariable</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
926
+ <span class='ivar'>@work_ready</span> <span class='op'>=</span> <span class='const'>ConditionVariable</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
927
+ <span class='ivar'>@controllers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
928
+ <span class='ivar'>@budget</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ByteBudget.html" title="Files::Transfer::ByteBudget (class)">ByteBudget</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ByteBudget.html#initialize-instance_method" title="Files::Transfer::ByteBudget#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_buffer_bytes'>buffer_bytes</span><span class='rparen'>)</span>
929
+ <span class='ivar'>@files</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FileSlots.html" title="Files::Transfer::FileSlots (class)">FileSlots</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FileSlots.html#initialize-instance_method" title="Files::Transfer::FileSlots#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_max_files'>max_files</span><span class='rparen'>)</span>
930
+ <span class='ivar'>@requests</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="RequestPermits.html" title="Files::Transfer::RequestPermits (class)">RequestPermits</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FileSlots.html#initialize-instance_method" title="Files::Transfer::FileSlots#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_automatic?'>automatic?</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_max_concurrency'>max_concurrency</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="Policy.html" title="Files::Transfer::Policy (class)">Policy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Policy.html#DEFAULT_MAX-constant" title="Files::Transfer::Policy::DEFAULT_MAX (constant)">DEFAULT_MAX</a></span></span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_concurrency'>concurrency</span><span class='rparen'>)</span>
931
+ <span class='ivar'>@holds</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Holds.html" title="Files::Transfer::Holds (class)">Holds</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Holds.html#initialize-instance_method" title="Files::Transfer::Holds#initialize (method)">new</a></span></span>
932
+ <span class='ivar'>@running</span> <span class='op'>=</span> <span class='int'>0</span>
933
+ <span class='ivar'>@tasks</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
934
+ <span class='ivar'>@workers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
935
+ <span class='ivar'>@idle</span> <span class='op'>=</span> <span class='int'>0</span>
936
+ <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>false</span>
937
+ <span class='ivar'>@transport</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="HttpTransport.html" title="Files::Transfer::HttpTransport (class)">HttpTransport</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="HttpTransport.html#initialize-instance_method" title="Files::Transfer::HttpTransport#initialize (method)">new</a></span></span>
938
+ <span class='ivar'>@client_transports</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compare_by_identity'>compare_by_identity</span>
939
+ <span class='ivar'>@notes</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
940
+ <span class='ivar'>@started_at</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='period'>.</span><span class='id identifier rubyid_now'><span class='object_link'><a href="Clock.html#now-class_method" title="Files::Transfer::Clock.now (method)">now</a></span></span>
941
+ <span class='ivar'>@accepted_bytes</span> <span class='op'>=</span> <span class='int'>0</span>
942
+ <span class='ivar'>@retries</span> <span class='op'>=</span> <span class='int'>0</span>
943
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_control'>control</span><span class='op'>&amp;.</span><span class='id identifier rubyid_subscribe'>subscribe</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
944
+ <span class='kw'>end</span></pre>
945
+ </td>
946
+ </tr>
947
+ </table>
948
+ </div>
949
+
950
+ </div>
951
+
952
+ <div id="instance_attr_details" class="attr_details">
953
+ <h2>Instance Attribute Details</h2>
954
+
955
+
956
+ <span id=""></span>
957
+ <div class="method_details first">
958
+ <h3 class="signature first" id="budget-instance_method">
959
+
960
+ #<strong>budget</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
961
+
962
+
963
+
964
+
965
+
966
+ </h3><div class="docstring">
967
+ <div class="discussion">
968
+ <p>Returns the value of attribute budget.</p>
969
+
970
+ </div>
971
+ </div>
972
+ <div class="tags">
973
+
974
+
975
+ </div><table class="source_code">
976
+ <tr>
977
+ <td>
978
+ <pre class="lines">
979
+
980
+
981
+ 21
982
+ 22
983
+ 23</pre>
984
+ </td>
985
+ <td>
986
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 21</span>
987
+
988
+ <span class='kw'>def</span> <span class='id identifier rubyid_budget'>budget</span>
989
+ <span class='ivar'>@budget</span>
990
+ <span class='kw'>end</span></pre>
991
+ </td>
992
+ </tr>
993
+ </table>
994
+ </div>
995
+
996
+
997
+ <span id=""></span>
998
+ <div class="method_details ">
999
+ <h3 class="signature " id="options-instance_method">
1000
+
1001
+ #<strong>options</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+ </h3><div class="docstring">
1008
+ <div class="discussion">
1009
+ <p>Returns the value of attribute options.</p>
1010
+
1011
+ </div>
1012
+ </div>
1013
+ <div class="tags">
1014
+
1015
+
1016
+ </div><table class="source_code">
1017
+ <tr>
1018
+ <td>
1019
+ <pre class="lines">
1020
+
1021
+
1022
+ 21
1023
+ 22
1024
+ 23</pre>
1025
+ </td>
1026
+ <td>
1027
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 21</span>
1028
+
1029
+ <span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
1030
+ <span class='ivar'>@options</span>
1031
+ <span class='kw'>end</span></pre>
1032
+ </td>
1033
+ </tr>
1034
+ </table>
1035
+ </div>
1036
+
1037
+
1038
+ <span id=""></span>
1039
+ <div class="method_details ">
1040
+ <h3 class="signature " id="transport-instance_method">
1041
+
1042
+ #<strong>transport</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </h3><div class="docstring">
1049
+ <div class="discussion">
1050
+ <p>Returns the value of attribute transport.</p>
1051
+
1052
+ </div>
1053
+ </div>
1054
+ <div class="tags">
1055
+
1056
+
1057
+ </div><table class="source_code">
1058
+ <tr>
1059
+ <td>
1060
+ <pre class="lines">
1061
+
1062
+
1063
+ 21
1064
+ 22
1065
+ 23</pre>
1066
+ </td>
1067
+ <td>
1068
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 21</span>
1069
+
1070
+ <span class='kw'>def</span> <span class='id identifier rubyid_transport'>transport</span>
1071
+ <span class='ivar'>@transport</span>
1072
+ <span class='kw'>end</span></pre>
1073
+ </td>
1074
+ </tr>
1075
+ </table>
1076
+ </div>
1077
+
1078
+ </div>
1079
+
1080
+
1081
+ <div id="class_method_details" class="method_details_list">
1082
+ <h2>Class Method Details</h2>
1083
+
1084
+
1085
+ <div class="method_details first">
1086
+ <h3 class="signature first" id="open-class_method">
1087
+
1088
+ .<strong>open</strong>(**options) &#x21d2; <tt>Object</tt>
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+ </h3><table class="source_code">
1095
+ <tr>
1096
+ <td>
1097
+ <pre class="lines">
1098
+
1099
+
1100
+ 23
1101
+ 24
1102
+ 25
1103
+ 26
1104
+ 27
1105
+ 28
1106
+ 29
1107
+ 30
1108
+ 31
1109
+ 32
1110
+ 33
1111
+ 34
1112
+ 35</pre>
1113
+ </td>
1114
+ <td>
1115
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 23</span>
1116
+
1117
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1118
+ <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1119
+ <span class='kw'>return</span> <span class='id identifier rubyid_job'>job</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1120
+
1121
+ <span class='id identifier rubyid_finished'>finished</span> <span class='op'>=</span> <span class='kw'>false</span>
1122
+ <span class='kw'>begin</span>
1123
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='kw'>yield</span> <span class='id identifier rubyid_job'>job</span>
1124
+ <span class='id identifier rubyid_finished'>finished</span> <span class='op'>=</span> <span class='kw'>true</span>
1125
+ <span class='id identifier rubyid_result'>result</span>
1126
+ <span class='kw'>ensure</span>
1127
+ <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='label'>strict:</span> <span class='id identifier rubyid_finished'>finished</span><span class='rparen'>)</span>
1128
+ <span class='kw'>end</span>
1129
+ <span class='kw'>end</span></pre>
1130
+ </td>
1131
+ </tr>
1132
+ </table>
1133
+ </div>
1134
+
1135
+ <div class="method_details ">
1136
+ <h3 class="signature " id="using-class_method">
1137
+
1138
+ .<strong>using</strong>(transfer) &#x21d2; <tt>Object</tt>
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ </h3><div class="docstring">
1145
+ <div class="discussion">
1146
+ <p>Runs the block with the Job transfer names: transfer itself, or a new Job closed afterwards.</p>
1147
+
1148
+ </div>
1149
+ </div>
1150
+ <div class="tags">
1151
+
1152
+
1153
+ </div><table class="source_code">
1154
+ <tr>
1155
+ <td>
1156
+ <pre class="lines">
1157
+
1158
+
1159
+ 38
1160
+ 39
1161
+ 40
1162
+ 41
1163
+ 42
1164
+ 43
1165
+ 44
1166
+ 45
1167
+ 46
1168
+ 47
1169
+ 48
1170
+ 49
1171
+ 50</pre>
1172
+ </td>
1173
+ <td>
1174
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 38</span>
1175
+
1176
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_using'>using</span><span class='lparen'>(</span><span class='id identifier rubyid_transfer'>transfer</span><span class='rparen'>)</span>
1177
+ <span class='kw'>return</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_transfer'>transfer</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_transfer'>transfer</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Files::Transfer::Job (class)">Job</a></span></span><span class='rparen'>)</span>
1178
+
1179
+ <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Options.html" title="Files::Transfer::Options (class)">Options</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from'><span class='object_link'><a href="Options.html#from-class_method" title="Files::Transfer::Options.from (method)">from</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_transfer'>transfer</span><span class='rparen'>)</span><span class='rparen'>)</span>
1180
+ <span class='id identifier rubyid_finished'>finished</span> <span class='op'>=</span> <span class='kw'>false</span>
1181
+ <span class='kw'>begin</span>
1182
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='kw'>yield</span> <span class='id identifier rubyid_job'>job</span>
1183
+ <span class='id identifier rubyid_finished'>finished</span> <span class='op'>=</span> <span class='kw'>true</span>
1184
+ <span class='id identifier rubyid_result'>result</span>
1185
+ <span class='kw'>ensure</span>
1186
+ <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='label'>strict:</span> <span class='id identifier rubyid_finished'>finished</span><span class='rparen'>)</span>
1187
+ <span class='kw'>end</span>
1188
+ <span class='kw'>end</span></pre>
1189
+ </td>
1190
+ </tr>
1191
+ </table>
1192
+ </div>
1193
+
1194
+ </div>
1195
+
1196
+ <div id="instance_method_details" class="method_details_list">
1197
+ <h2>Instance Method Details</h2>
1198
+
1199
+
1200
+ <div class="method_details first">
1201
+ <h3 class="signature first" id="acquire_file-instance_method">
1202
+
1203
+ #<strong>acquire_file</strong>(control) &#x21d2; <tt>Object</tt>
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+ </h3><div class="docstring">
1210
+ <div class="discussion">
1211
+ <p>Waits for a file slot: returns :running once the caller has one, or control's :cancelled or :paused. Nothing of
1212
+ the transfer is opened before it.</p>
1213
+
1214
+ </div>
1215
+ </div>
1216
+ <div class="tags">
1217
+
1218
+
1219
+ </div><table class="source_code">
1220
+ <tr>
1221
+ <td>
1222
+ <pre class="lines">
1223
+
1224
+
1225
+ 212
1226
+ 213
1227
+ 214</pre>
1228
+ </td>
1229
+ <td>
1230
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 212</span>
1231
+
1232
+ <span class='kw'>def</span> <span class='id identifier rubyid_acquire_file'>acquire_file</span><span class='lparen'>(</span><span class='id identifier rubyid_control'>control</span><span class='rparen'>)</span>
1233
+ <span class='id identifier rubyid_acquire'>acquire</span><span class='lparen'>(</span><span class='ivar'>@files</span><span class='comma'>,</span> <span class='id identifier rubyid_control'>control</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@running</span> <span class='op'>+=</span> <span class='int'>1</span> <span class='rbrace'>}</span>
1234
+ <span class='kw'>end</span></pre>
1235
+ </td>
1236
+ </tr>
1237
+ </table>
1238
+ </div>
1239
+
1240
+ <div class="method_details ">
1241
+ <h3 class="signature " id="acquire_request-instance_method">
1242
+
1243
+ #<strong>acquire_request</strong>(control, url) &#x21d2; <tt>Object</tt>
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+ </h3><div class="docstring">
1250
+ <div class="discussion">
1251
+ <p>Waits, on a transfer's own thread, for a request permit for a request that thread sends itself to url, once no
1252
+ throttle holds url's destination back: returns :running once it holds one, or control's :cancelled or :paused as
1253
+ soon as it stops. Give it back with release_request.</p>
1254
+
1255
+ </div>
1256
+ </div>
1257
+ <div class="tags">
1258
+
1259
+
1260
+ </div><table class="source_code">
1261
+ <tr>
1262
+ <td>
1263
+ <pre class="lines">
1264
+
1265
+
1266
+ 226
1267
+ 227
1268
+ 228</pre>
1269
+ </td>
1270
+ <td>
1271
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 226</span>
1272
+
1273
+ <span class='kw'>def</span> <span class='id identifier rubyid_acquire_request'>acquire_request</span><span class='lparen'>(</span><span class='id identifier rubyid_control'>control</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1274
+ <span class='id identifier rubyid_acquire'>acquire</span><span class='lparen'>(</span><span class='ivar'>@requests</span><span class='comma'>,</span> <span class='id identifier rubyid_control'>control</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Holds.html" title="Files::Transfer::Holds (class)">Holds</a></span></span><span class='period'>.</span><span class='id identifier rubyid_destination'><span class='object_link'><a href="Holds.html#destination-class_method" title="Files::Transfer::Holds.destination (method)">destination</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span><span class='rparen'>)</span>
1275
+ <span class='kw'>end</span></pre>
1276
+ </td>
1277
+ </tr>
1278
+ </table>
1279
+ </div>
1280
+
1281
+ <div class="method_details ">
1282
+ <h3 class="signature " id="close-instance_method">
1283
+
1284
+ #<strong>close</strong>(strict: true) &#x21d2; <tt>Object</tt>
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+ </h3><div class="docstring">
1291
+ <div class="discussion">
1292
+ <p>Stops the job: transfers still running on it stop with an error, and it waits for them and the requests they
1293
+ have in flight, at most five seconds in all. Returns true once nothing is left running. When something still is,
1294
+ it raises Files::Error; with strict: false, as when a transfer on its own Job has already failed, it returns
1295
+ false instead and what is left finishes in the background.</p>
1296
+
1297
+ </div>
1298
+ </div>
1299
+ <div class="tags">
1300
+
1301
+ <p class="tag_title">Raises:</p>
1302
+ <ul class="raise">
1303
+
1304
+ <li>
1305
+
1306
+
1307
+ <span class='type'>(<tt><span class='object_link'><a href="../Error.html" title="Files::Error (class)">Files::Error</a></span></tt>)</span>
1308
+
1309
+
1310
+
1311
+ </li>
1312
+
1313
+ </ul>
1314
+
1315
+ </div><table class="source_code">
1316
+ <tr>
1317
+ <td>
1318
+ <pre class="lines">
1319
+
1320
+
1321
+ 128
1322
+ 129
1323
+ 130
1324
+ 131
1325
+ 132
1326
+ 133
1327
+ 134
1328
+ 135
1329
+ 136
1330
+ 137
1331
+ 138
1332
+ 139
1333
+ 140
1334
+ 141
1335
+ 142
1336
+ 143
1337
+ 144
1338
+ 145
1339
+ 146
1340
+ 147
1341
+ 148
1342
+ 149
1343
+ 150
1344
+ 151
1345
+ 152</pre>
1346
+ </td>
1347
+ <td>
1348
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 128</span>
1349
+
1350
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='label'>strict:</span> <span class='kw'>true</span><span class='rparen'>)</span>
1351
+ <span class='id identifier rubyid_deadline'>deadline</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='period'>.</span><span class='id identifier rubyid_now'><span class='object_link'><a href="Clock.html#now-class_method" title="Files::Transfer::Clock.now (method)">now</a></span></span> <span class='op'>+</span> <span class='const'><span class='object_link'><a href="#CLOSE_WAIT_SECONDS-constant" title="Files::Transfer::Job::CLOSE_WAIT_SECONDS (constant)">CLOSE_WAIT_SECONDS</a></span></span>
1352
+ <span class='id identifier rubyid_workers'>workers</span> <span class='op'>=</span> <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
1353
+ <span class='kw'>unless</span> <span class='ivar'>@closed</span>
1354
+ <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>true</span>
1355
+ <span class='ivar'>@work_ready</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
1356
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
1357
+ <span class='kw'>end</span>
1358
+ <span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
1359
+ <span class='id identifier rubyid_remaining'>remaining</span> <span class='op'>=</span> <span class='id identifier rubyid_deadline'>deadline</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='period'>.</span><span class='id identifier rubyid_now'><span class='object_link'><a href="Clock.html#now-class_method" title="Files::Transfer::Clock.now (method)">now</a></span></span>
1360
+ <span class='kw'>break</span> <span class='kw'>if</span> <span class='ivar'>@running</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_remaining'>remaining</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
1361
+
1362
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_wait'>wait</span><span class='lparen'>(</span><span class='ivar'>@lock</span><span class='comma'>,</span> <span class='id identifier rubyid_remaining'>remaining</span><span class='rparen'>)</span>
1363
+ <span class='kw'>end</span>
1364
+ <span class='ivar'>@workers</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1365
+ <span class='kw'>end</span>
1366
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_control'>control</span><span class='op'>&amp;.</span><span class='id identifier rubyid_unsubscribe'>unsubscribe</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1367
+ <span class='id identifier rubyid_workers'>workers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_worker'>worker</span><span class='op'>|</span> <span class='id identifier rubyid_worker'>worker</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='lbracket'>[</span> <span class='id identifier rubyid_deadline'>deadline</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='period'>.</span><span class='id identifier rubyid_now'><span class='object_link'><a href="Clock.html#now-class_method" title="Files::Transfer::Clock.now (method)">now</a></span></span><span class='comma'>,</span> <span class='int'>0</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1368
+ <span class='id identifier rubyid_live'>live</span> <span class='op'>=</span> <span class='id identifier rubyid_workers'>workers</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:alive?</span><span class='rparen'>)</span>
1369
+ <span class='id identifier rubyid_running'>running</span> <span class='op'>=</span> <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@running</span> <span class='rbrace'>}</span>
1370
+ <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_live'>live</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_running'>running</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span>
1371
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_strict'>strict</span>
1372
+
1373
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Files.html" title="Files (module)">Files</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Error.html" title="Files::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The transfer job closed with </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_running'>running</span><span class='embexpr_end'>}</span><span class='tstring_content'> transfers and </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_live'>live</span><span class='embexpr_end'>}</span><span class='tstring_content'> requests still running after </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#CLOSE_WAIT_SECONDS-constant" title="Files::Transfer::Job::CLOSE_WAIT_SECONDS (constant)">CLOSE_WAIT_SECONDS</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'> seconds</span><span class='tstring_end'>&quot;</span></span>
1374
+ <span class='kw'>end</span></pre>
1375
+ </td>
1376
+ </tr>
1377
+ </table>
1378
+ </div>
1379
+
1380
+ <div class="method_details ">
1381
+ <h3 class="signature " id="closed?-instance_method">
1382
+
1383
+ #<strong>closed?</strong> &#x21d2; <tt>Boolean</tt>
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+ </h3><div class="docstring">
1390
+ <div class="discussion">
1391
+
1392
+
1393
+ </div>
1394
+ </div>
1395
+ <div class="tags">
1396
+
1397
+ <p class="tag_title">Returns:</p>
1398
+ <ul class="return">
1399
+
1400
+ <li>
1401
+
1402
+
1403
+ <span class='type'>(<tt>Boolean</tt>)</span>
1404
+
1405
+
1406
+
1407
+ </li>
1408
+
1409
+ </ul>
1410
+
1411
+ </div><table class="source_code">
1412
+ <tr>
1413
+ <td>
1414
+ <pre class="lines">
1415
+
1416
+
1417
+ 80
1418
+ 81
1419
+ 82</pre>
1420
+ </td>
1421
+ <td>
1422
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 80</span>
1423
+
1424
+ <span class='kw'>def</span> <span class='id identifier rubyid_closed?'>closed?</span>
1425
+ <span class='ivar'>@closed</span>
1426
+ <span class='kw'>end</span></pre>
1427
+ </td>
1428
+ </tr>
1429
+ </table>
1430
+ </div>
1431
+
1432
+ <div class="method_details ">
1433
+ <h3 class="signature " id="control-instance_method">
1434
+
1435
+ #<strong>control</strong> &#x21d2; <tt>Object</tt>
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+ </h3><table class="source_code">
1442
+ <tr>
1443
+ <td>
1444
+ <pre class="lines">
1445
+
1446
+
1447
+ 76
1448
+ 77
1449
+ 78</pre>
1450
+ </td>
1451
+ <td>
1452
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 76</span>
1453
+
1454
+ <span class='kw'>def</span> <span class='id identifier rubyid_control'>control</span>
1455
+ <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_control'>control</span>
1456
+ <span class='kw'>end</span></pre>
1457
+ </td>
1458
+ </tr>
1459
+ </table>
1460
+ </div>
1461
+
1462
+ <div class="method_details ">
1463
+ <h3 class="signature " id="controller-instance_method">
1464
+
1465
+ #<strong>controller</strong>(key) &#x21d2; <tt>Object</tt>
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+ </h3><div class="docstring">
1472
+ <div class="discussion">
1473
+ <p>With the lock held: the controller for key, made from the policy the block returns the first time.</p>
1474
+
1475
+ </div>
1476
+ </div>
1477
+ <div class="tags">
1478
+
1479
+
1480
+ </div><table class="source_code">
1481
+ <tr>
1482
+ <td>
1483
+ <pre class="lines">
1484
+
1485
+
1486
+ 183
1487
+ 184
1488
+ 185</pre>
1489
+ </td>
1490
+ <td>
1491
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 183</span>
1492
+
1493
+ <span class='kw'>def</span> <span class='id identifier rubyid_controller'>controller</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1494
+ <span class='ivar'>@controllers</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="Controller.html" title="Files::Transfer::Controller (class)">Controller</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Controller.html#initialize-instance_method" title="Files::Transfer::Controller#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>yield</span><span class='rparen'>)</span>
1495
+ <span class='kw'>end</span></pre>
1496
+ </td>
1497
+ </tr>
1498
+ </table>
1499
+ </div>
1500
+
1501
+ <div class="method_details ">
1502
+ <h3 class="signature " id="count_accepted-instance_method">
1503
+
1504
+ #<strong>count_accepted</strong>(bytes) &#x21d2; <tt>Object</tt>
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+ </h3><div class="docstring">
1511
+ <div class="discussion">
1512
+ <p>With the lock held: counts bytes accepted for the first time.</p>
1513
+
1514
+ </div>
1515
+ </div>
1516
+ <div class="tags">
1517
+
1518
+
1519
+ </div><table class="source_code">
1520
+ <tr>
1521
+ <td>
1522
+ <pre class="lines">
1523
+
1524
+
1525
+ 264
1526
+ 265
1527
+ 266</pre>
1528
+ </td>
1529
+ <td>
1530
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 264</span>
1531
+
1532
+ <span class='kw'>def</span> <span class='id identifier rubyid_count_accepted'>count_accepted</span><span class='lparen'>(</span><span class='id identifier rubyid_bytes'>bytes</span><span class='rparen'>)</span>
1533
+ <span class='ivar'>@accepted_bytes</span> <span class='op'>+=</span> <span class='id identifier rubyid_bytes'>bytes</span>
1534
+ <span class='kw'>end</span></pre>
1535
+ </td>
1536
+ </tr>
1537
+ </table>
1538
+ </div>
1539
+
1540
+ <div class="method_details ">
1541
+ <h3 class="signature " id="count_retry-instance_method">
1542
+
1543
+ #<strong>count_retry</strong> &#x21d2; <tt>Object</tt>
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+ </h3><div class="docstring">
1550
+ <div class="discussion">
1551
+ <p>With the lock held: counts a request about to be sent again.</p>
1552
+
1553
+ </div>
1554
+ </div>
1555
+ <div class="tags">
1556
+
1557
+
1558
+ </div><table class="source_code">
1559
+ <tr>
1560
+ <td>
1561
+ <pre class="lines">
1562
+
1563
+
1564
+ 269
1565
+ 270
1566
+ 271</pre>
1567
+ </td>
1568
+ <td>
1569
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 269</span>
1570
+
1571
+ <span class='kw'>def</span> <span class='id identifier rubyid_count_retry'>count_retry</span>
1572
+ <span class='ivar'>@retries</span> <span class='op'>+=</span> <span class='int'>1</span>
1573
+ <span class='kw'>end</span></pre>
1574
+ </td>
1575
+ </tr>
1576
+ </table>
1577
+ </div>
1578
+
1579
+ <div class="method_details ">
1580
+ <h3 class="signature " id="diagnostics-instance_method">
1581
+
1582
+ #<strong>diagnostics</strong> &#x21d2; <tt>Object</tt>
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+ </h3><div class="docstring">
1589
+ <div class="discussion">
1590
+ <p>A snapshot of how the job's transfers ran:</p>
1591
+ <dl>
1592
+ <dt>accepted_bytes</dt>
1593
+ <dd><p>Bytes storage acknowledged (uploads) or that were received for writing (downloads), each
1594
+ counted once however often its request was sent.</p></dd>
1595
+ <dt>elapsed_seconds</dt>
1596
+ <dd><p>Seconds since the job began.</p></dd>
1597
+ <dt>goodput_bytes_per_second</dt>
1598
+ <dd><p>accepted_bytes over elapsed_seconds.</p></dd>
1599
+ <dt>retries</dt>
1600
+ <dd><p>Requests sent again after a failure, a throttle or an expired URL.</p></dd>
1601
+ <dt>requests</dt>
1602
+ <dd><p>Content requests in flight now, of at most request_limit.</p></dd>
1603
+ <dt>held_bytes</dt>
1604
+ <dd><p>Bytes held now for parts waiting to be sent or written.</p></dd>
1605
+ <dt>controllers</dt>
1606
+ <dd><p>Each controller's key, policy, phase, limit, attempts admitted against it (admitted) and on the
1607
+ network (inflight), epoch, judged_windows and ineligible_windows (windows closed without judging,
1608
+ because too few requests were on the network) and decisions.</p></dd>
1609
+ <dt>throttled</dt>
1610
+ <dd><p>Each origin a throttle's Retry-After holds back now (Holds), with the seconds left.</p></dd>
1611
+ <dt>notes</dt>
1612
+ <dd><p>How transfers ran, such as a caller's client carrying them one request at a time.</p></dd>
1613
+ </dl>
1614
+ <p>It holds no URLs or credentials: a controller's key names only the kind of destination and its host, and a
1615
+ throttled origin only its scheme, host and port.</p>
1616
+
1617
+ </div>
1618
+ </div>
1619
+ <div class="tags">
1620
+
1621
+
1622
+ </div><table class="source_code">
1623
+ <tr>
1624
+ <td>
1625
+ <pre class="lines">
1626
+
1627
+
1628
+ 106
1629
+ 107
1630
+ 108
1631
+ 109
1632
+ 110
1633
+ 111
1634
+ 112
1635
+ 113
1636
+ 114
1637
+ 115
1638
+ 116
1639
+ 117
1640
+ 118
1641
+ 119
1642
+ 120
1643
+ 121
1644
+ 122</pre>
1645
+ </td>
1646
+ <td>
1647
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 106</span>
1648
+
1649
+ <span class='kw'>def</span> <span class='id identifier rubyid_diagnostics'>diagnostics</span>
1650
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
1651
+ <span class='id identifier rubyid_elapsed'>elapsed</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Clock.html" title="Files::Transfer::Clock (module)">Clock</a></span></span><span class='period'>.</span><span class='id identifier rubyid_now'><span class='object_link'><a href="Clock.html#now-class_method" title="Files::Transfer::Clock.now (method)">now</a></span></span> <span class='op'>-</span> <span class='ivar'>@started_at</span>
1652
+ <span class='lbrace'>{</span>
1653
+ <span class='label'>accepted_bytes:</span> <span class='ivar'>@accepted_bytes</span><span class='comma'>,</span>
1654
+ <span class='label'>elapsed_seconds:</span> <span class='id identifier rubyid_elapsed'>elapsed</span><span class='comma'>,</span>
1655
+ <span class='label'>goodput_bytes_per_second:</span> <span class='id identifier rubyid_elapsed'>elapsed</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span> <span class='op'>?</span> <span class='ivar'>@accepted_bytes</span> <span class='op'>/</span> <span class='id identifier rubyid_elapsed'>elapsed</span> <span class='op'>:</span> <span class='float'>0.0</span><span class='comma'>,</span>
1656
+ <span class='label'>retries:</span> <span class='ivar'>@retries</span><span class='comma'>,</span>
1657
+ <span class='label'>requests:</span> <span class='ivar'>@requests</span><span class='period'>.</span><span class='id identifier rubyid_used'>used</span><span class='comma'>,</span>
1658
+ <span class='label'>request_limit:</span> <span class='ivar'>@requests</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='comma'>,</span>
1659
+ <span class='label'>controllers:</span> <span class='ivar'>@controllers</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='op'>|</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_snapshot'>snapshot</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>key:</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>decisions:</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_decisions'>decisions</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
1660
+ <span class='label'>held_bytes:</span> <span class='ivar'>@budget</span><span class='period'>.</span><span class='id identifier rubyid_held'>held</span><span class='comma'>,</span>
1661
+ <span class='label'>throttled:</span> <span class='ivar'>@holds</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='comma'>,</span>
1662
+ <span class='label'>notes:</span> <span class='ivar'>@notes</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1663
+ <span class='rbrace'>}</span>
1664
+ <span class='kw'>end</span>
1665
+ <span class='kw'>end</span></pre>
1666
+ </td>
1667
+ </tr>
1668
+ </table>
1669
+ </div>
1670
+
1671
+ <div class="method_details ">
1672
+ <h3 class="signature " id="give_request-instance_method">
1673
+
1674
+ #<strong>give_request</strong> &#x21d2; <tt>Object</tt>
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+ </h3><div class="docstring">
1681
+ <div class="discussion">
1682
+ <p>With the lock held: gives a worker's request permit back and wakes everything waiting for one.</p>
1683
+
1684
+ </div>
1685
+ </div>
1686
+ <div class="tags">
1687
+
1688
+
1689
+ </div><table class="source_code">
1690
+ <tr>
1691
+ <td>
1692
+ <pre class="lines">
1693
+
1694
+
1695
+ 246
1696
+ 247
1697
+ 248
1698
+ 249</pre>
1699
+ </td>
1700
+ <td>
1701
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 246</span>
1702
+
1703
+ <span class='kw'>def</span> <span class='id identifier rubyid_give_request'>give_request</span>
1704
+ <span class='ivar'>@requests</span><span class='period'>.</span><span class='id identifier rubyid_give'>give</span>
1705
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
1706
+ <span class='kw'>end</span></pre>
1707
+ </td>
1708
+ </tr>
1709
+ </table>
1710
+ </div>
1711
+
1712
+ <div class="method_details ">
1713
+ <h3 class="signature " id="held_bytes-instance_method">
1714
+
1715
+ #<strong>held_bytes</strong> &#x21d2; <tt>Object</tt>
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+ </h3><div class="docstring">
1722
+ <div class="discussion">
1723
+ <p>Bytes held right now for parts waiting to be sent or written.</p>
1724
+
1725
+ </div>
1726
+ </div>
1727
+ <div class="tags">
1728
+
1729
+
1730
+ </div><table class="source_code">
1731
+ <tr>
1732
+ <td>
1733
+ <pre class="lines">
1734
+
1735
+
1736
+ 85
1737
+ 86
1738
+ 87</pre>
1739
+ </td>
1740
+ <td>
1741
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 85</span>
1742
+
1743
+ <span class='kw'>def</span> <span class='id identifier rubyid_held_bytes'>held_bytes</span>
1744
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@budget</span><span class='period'>.</span><span class='id identifier rubyid_held'>held</span> <span class='rbrace'>}</span>
1745
+ <span class='kw'>end</span></pre>
1746
+ </td>
1747
+ </tr>
1748
+ </table>
1749
+ </div>
1750
+
1751
+ <div class="method_details ">
1752
+ <h3 class="signature " id="held_until-instance_method">
1753
+
1754
+ #<strong>held_until</strong>(url) &#x21d2; <tt>Object</tt>
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+ </h3><div class="docstring">
1761
+ <div class="discussion">
1762
+ <p>With the lock held: the monotonic time until which a throttle holds url's destination back, or nil.</p>
1763
+
1764
+ </div>
1765
+ </div>
1766
+ <div class="tags">
1767
+
1768
+
1769
+ </div><table class="source_code">
1770
+ <tr>
1771
+ <td>
1772
+ <pre class="lines">
1773
+
1774
+
1775
+ 259
1776
+ 260
1777
+ 261</pre>
1778
+ </td>
1779
+ <td>
1780
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 259</span>
1781
+
1782
+ <span class='kw'>def</span> <span class='id identifier rubyid_held_until'>held_until</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1783
+ <span class='ivar'>@holds</span><span class='period'>.</span><span class='id identifier rubyid_deadline'>deadline</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Holds.html" title="Files::Transfer::Holds (class)">Holds</a></span></span><span class='period'>.</span><span class='id identifier rubyid_destination'><span class='object_link'><a href="Holds.html#destination-class_method" title="Files::Transfer::Holds.destination (method)">destination</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span><span class='rparen'>)</span>
1784
+ <span class='kw'>end</span></pre>
1785
+ </td>
1786
+ </tr>
1787
+ </table>
1788
+ </div>
1789
+
1790
+ <div class="method_details ">
1791
+ <h3 class="signature " id="hold-instance_method">
1792
+
1793
+ #<strong>hold</strong>(url, seconds) &#x21d2; <tt>Object</tt>
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+ </h3><div class="docstring">
1800
+ <div class="discussion">
1801
+ <p>With the lock held: holds url's destination back for seconds, a throttle's Retry-After, from every new request
1802
+ and retry of the job's transfers, unless it already is for longer, and wakes everything waiting.</p>
1803
+
1804
+ </div>
1805
+ </div>
1806
+ <div class="tags">
1807
+
1808
+
1809
+ </div><table class="source_code">
1810
+ <tr>
1811
+ <td>
1812
+ <pre class="lines">
1813
+
1814
+
1815
+ 253
1816
+ 254
1817
+ 255
1818
+ 256</pre>
1819
+ </td>
1820
+ <td>
1821
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 253</span>
1822
+
1823
+ <span class='kw'>def</span> <span class='id identifier rubyid_hold'>hold</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_seconds'>seconds</span><span class='rparen'>)</span>
1824
+ <span class='ivar'>@holds</span><span class='period'>.</span><span class='id identifier rubyid_hold'>hold</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Holds.html" title="Files::Transfer::Holds (class)">Holds</a></span></span><span class='period'>.</span><span class='id identifier rubyid_destination'><span class='object_link'><a href="Holds.html#destination-class_method" title="Files::Transfer::Holds.destination (method)">destination</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_seconds'>seconds</span><span class='rparen'>)</span>
1825
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
1826
+ <span class='kw'>end</span></pre>
1827
+ </td>
1828
+ </tr>
1829
+ </table>
1830
+ </div>
1831
+
1832
+ <div class="method_details ">
1833
+ <h3 class="signature " id="note-instance_method">
1834
+
1835
+ #<strong>note</strong>(message) &#x21d2; <tt>Object</tt>
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+ </h3><div class="docstring">
1842
+ <div class="discussion">
1843
+ <p>With the lock held.</p>
1844
+
1845
+ </div>
1846
+ </div>
1847
+ <div class="tags">
1848
+
1849
+
1850
+ </div><table class="source_code">
1851
+ <tr>
1852
+ <td>
1853
+ <pre class="lines">
1854
+
1855
+
1856
+ 205
1857
+ 206
1858
+ 207
1859
+ 208</pre>
1860
+ </td>
1861
+ <td>
1862
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 205</span>
1863
+
1864
+ <span class='kw'>def</span> <span class='id identifier rubyid_note'>note</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
1865
+ <span class='ivar'>@notes</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span> <span class='kw'>if</span> <span class='ivar'>@notes</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#MAX_NOTES-constant" title="Files::Transfer::Job::MAX_NOTES (constant)">MAX_NOTES</a></span></span>
1866
+ <span class='ivar'>@notes</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
1867
+ <span class='kw'>end</span></pre>
1868
+ </td>
1869
+ </tr>
1870
+ </table>
1871
+ </div>
1872
+
1873
+ <div class="method_details ">
1874
+ <h3 class="signature " id="post-instance_method">
1875
+
1876
+ #<strong>post</strong> &#x21d2; <tt>Object</tt>
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+ </h3><div class="docstring">
1883
+ <div class="discussion">
1884
+ <p>Runs the block under the lock and wakes everything waiting.</p>
1885
+
1886
+ </div>
1887
+ </div>
1888
+ <div class="tags">
1889
+
1890
+
1891
+ </div><table class="source_code">
1892
+ <tr>
1893
+ <td>
1894
+ <pre class="lines">
1895
+
1896
+
1897
+ 175
1898
+ 176
1899
+ 177
1900
+ 178
1901
+ 179
1902
+ 180</pre>
1903
+ </td>
1904
+ <td>
1905
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 175</span>
1906
+
1907
+ <span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span>
1908
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
1909
+ <span class='kw'>yield</span>
1910
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
1911
+ <span class='kw'>end</span>
1912
+ <span class='kw'>end</span></pre>
1913
+ </td>
1914
+ </tr>
1915
+ </table>
1916
+ </div>
1917
+
1918
+ <div class="method_details ">
1919
+ <h3 class="signature " id="release_file-instance_method">
1920
+
1921
+ #<strong>release_file</strong> &#x21d2; <tt>Object</tt>
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+ </h3><table class="source_code">
1928
+ <tr>
1929
+ <td>
1930
+ <pre class="lines">
1931
+
1932
+
1933
+ 216
1934
+ 217
1935
+ 218
1936
+ 219
1937
+ 220
1938
+ 221</pre>
1939
+ </td>
1940
+ <td>
1941
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 216</span>
1942
+
1943
+ <span class='kw'>def</span> <span class='id identifier rubyid_release_file'>release_file</span>
1944
+ <span class='id identifier rubyid_post'>post</span> <span class='kw'>do</span>
1945
+ <span class='ivar'>@files</span><span class='period'>.</span><span class='id identifier rubyid_give'>give</span>
1946
+ <span class='ivar'>@running</span> <span class='op'>-=</span> <span class='int'>1</span>
1947
+ <span class='kw'>end</span>
1948
+ <span class='kw'>end</span></pre>
1949
+ </td>
1950
+ </tr>
1951
+ </table>
1952
+ </div>
1953
+
1954
+ <div class="method_details ">
1955
+ <h3 class="signature " id="release_request-instance_method">
1956
+
1957
+ #<strong>release_request</strong>(url = nil, seconds = nil) &#x21d2; <tt>Object</tt>
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+ </h3><div class="docstring">
1964
+ <div class="discussion">
1965
+ <p>Gives back a permit acquire_request took. A throttle the request met, when seconds is given, holds url's
1966
+ destination back first, under the same lock and in the same order as a worker's request (Coordinator#launch),
1967
+ so nothing waiting for the permit is sent before that hold.</p>
1968
+
1969
+ </div>
1970
+ </div>
1971
+ <div class="tags">
1972
+
1973
+
1974
+ </div><table class="source_code">
1975
+ <tr>
1976
+ <td>
1977
+ <pre class="lines">
1978
+
1979
+
1980
+ 233
1981
+ 234
1982
+ 235
1983
+ 236
1984
+ 237
1985
+ 238</pre>
1986
+ </td>
1987
+ <td>
1988
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 233</span>
1989
+
1990
+ <span class='kw'>def</span> <span class='id identifier rubyid_release_request'>release_request</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_seconds'>seconds</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1991
+ <span class='id identifier rubyid_post'>post</span> <span class='kw'>do</span>
1992
+ <span class='id identifier rubyid_hold'>hold</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_seconds'>seconds</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_seconds'>seconds</span>
1993
+ <span class='ivar'>@requests</span><span class='period'>.</span><span class='id identifier rubyid_give'>give</span>
1994
+ <span class='kw'>end</span>
1995
+ <span class='kw'>end</span></pre>
1996
+ </td>
1997
+ </tr>
1998
+ </table>
1999
+ </div>
2000
+
2001
+ <div class="method_details ">
2002
+ <h3 class="signature " id="signal-instance_method">
2003
+
2004
+ #<strong>signal</strong> &#x21d2; <tt>Object</tt>
2005
+
2006
+
2007
+
2008
+
2009
+
2010
+ </h3><div class="docstring">
2011
+ <div class="discussion">
2012
+ <p>With the lock held: wakes everything waiting for a change.</p>
2013
+
2014
+ </div>
2015
+ </div>
2016
+ <div class="tags">
2017
+
2018
+
2019
+ </div><table class="source_code">
2020
+ <tr>
2021
+ <td>
2022
+ <pre class="lines">
2023
+
2024
+
2025
+ 170
2026
+ 171
2027
+ 172</pre>
2028
+ </td>
2029
+ <td>
2030
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 170</span>
2031
+
2032
+ <span class='kw'>def</span> <span class='id identifier rubyid_signal'>signal</span>
2033
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span>
2034
+ <span class='kw'>end</span></pre>
2035
+ </td>
2036
+ </tr>
2037
+ </table>
2038
+ </div>
2039
+
2040
+ <div class="method_details ">
2041
+ <h3 class="signature " id="submit-instance_method">
2042
+
2043
+ #<strong>submit</strong>(&amp;work) &#x21d2; <tt>Object</tt>
2044
+
2045
+
2046
+
2047
+
2048
+
2049
+ </h3><div class="docstring">
2050
+ <div class="discussion">
2051
+ <p>With the lock held: runs work on a worker thread, which passes it the connections that thread owns.</p>
2052
+
2053
+ </div>
2054
+ </div>
2055
+ <div class="tags">
2056
+
2057
+ <p class="tag_title">Raises:</p>
2058
+ <ul class="raise">
2059
+
2060
+ <li>
2061
+
2062
+
2063
+ <span class='type'>(<tt><span class='object_link'><a href="../Error.html" title="Files::Error (class)">Files::Error</a></span></tt>)</span>
2064
+
2065
+
2066
+
2067
+ </li>
2068
+
2069
+ </ul>
2070
+
2071
+ </div><table class="source_code">
2072
+ <tr>
2073
+ <td>
2074
+ <pre class="lines">
2075
+
2076
+
2077
+ 293
2078
+ 294
2079
+ 295
2080
+ 296
2081
+ 297
2082
+ 298
2083
+ 299
2084
+ 300
2085
+ 301
2086
+ 302</pre>
2087
+ </td>
2088
+ <td>
2089
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 293</span>
2090
+
2091
+ <span class='kw'>def</span> <span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_work'>work</span><span class='rparen'>)</span>
2092
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Files.html" title="Files (module)">Files</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Error.html" title="Files::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The transfer job is closed</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='ivar'>@closed</span>
2093
+
2094
+ <span class='ivar'>@tasks</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_work'>work</span>
2095
+ <span class='kw'>if</span> <span class='ivar'>@tasks</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='ivar'>@idle</span>
2096
+ <span class='id identifier rubyid_spawn_worker'>spawn_worker</span>
2097
+ <span class='kw'>else</span>
2098
+ <span class='ivar'>@work_ready</span><span class='period'>.</span><span class='id identifier rubyid_signal'>signal</span>
2099
+ <span class='kw'>end</span>
2100
+ <span class='kw'>end</span></pre>
2101
+ </td>
2102
+ </tr>
2103
+ </table>
2104
+ </div>
2105
+
2106
+ <div class="method_details ">
2107
+ <h3 class="signature " id="synchronize-instance_method">
2108
+
2109
+ #<strong>synchronize</strong>(&amp;block) &#x21d2; <tt>Object</tt>
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+ </h3><table class="source_code">
2116
+ <tr>
2117
+ <td>
2118
+ <pre class="lines">
2119
+
2120
+
2121
+ 159
2122
+ 160
2123
+ 161</pre>
2124
+ </td>
2125
+ <td>
2126
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 159</span>
2127
+
2128
+ <span class='kw'>def</span> <span class='id identifier rubyid_synchronize'>synchronize</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2129
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2130
+ <span class='kw'>end</span></pre>
2131
+ </td>
2132
+ </tr>
2133
+ </table>
2134
+ </div>
2135
+
2136
+ <div class="method_details ">
2137
+ <h3 class="signature " id="take_request-instance_method">
2138
+
2139
+ #<strong>take_request</strong> &#x21d2; <tt>Object</tt>
2140
+
2141
+
2142
+
2143
+
2144
+
2145
+ </h3><div class="docstring">
2146
+ <div class="discussion">
2147
+ <p>With the lock held: takes a request permit for a worker's request when one is free.</p>
2148
+
2149
+ </div>
2150
+ </div>
2151
+ <div class="tags">
2152
+
2153
+
2154
+ </div><table class="source_code">
2155
+ <tr>
2156
+ <td>
2157
+ <pre class="lines">
2158
+
2159
+
2160
+ 241
2161
+ 242
2162
+ 243</pre>
2163
+ </td>
2164
+ <td>
2165
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 241</span>
2166
+
2167
+ <span class='kw'>def</span> <span class='id identifier rubyid_take_request'>take_request</span>
2168
+ <span class='ivar'>@requests</span><span class='period'>.</span><span class='id identifier rubyid_take'>take</span>
2169
+ <span class='kw'>end</span></pre>
2170
+ </td>
2171
+ </tr>
2172
+ </table>
2173
+ </div>
2174
+
2175
+ <div class="method_details ">
2176
+ <h3 class="signature " id="transport_for-instance_method">
2177
+
2178
+ #<strong>transport_for</strong>(client, download: false) &#x21d2; <tt>Object</tt>
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+ </h3><div class="docstring">
2185
+ <div class="discussion">
2186
+ <p>The transport for a transfer's content requests through client, which the caller's thread resolved: the job's
2187
+ own only when client is the SDK's own kind with its default connection unchanged and the job's own proxy
2188
+ (HttpTransport#compatible?), otherwise client itself, one request at a time. A download refuses, with
2189
+ BufferLimitError, a client whose adapter is not one it relies on to stream a response (ClientTransport.streams?),
2190
+ before it sends a content request or writes anything.</p>
2191
+
2192
+ </div>
2193
+ </div>
2194
+ <div class="tags">
2195
+
2196
+ <p class="tag_title">Raises:</p>
2197
+ <ul class="raise">
2198
+
2199
+ <li>
2200
+
2201
+
2202
+ <span class='type'>(<tt><span class='object_link'><a href="BufferLimitError.html" title="Files::Transfer::BufferLimitError (class)">BufferLimitError</a></span></tt>)</span>
2203
+
2204
+
2205
+
2206
+ </li>
2207
+
2208
+ </ul>
2209
+
2210
+ </div><table class="source_code">
2211
+ <tr>
2212
+ <td>
2213
+ <pre class="lines">
2214
+
2215
+
2216
+ 192
2217
+ 193
2218
+ 194
2219
+ 195
2220
+ 196
2221
+ 197
2222
+ 198
2223
+ 199
2224
+ 200
2225
+ 201
2226
+ 202</pre>
2227
+ </td>
2228
+ <td>
2229
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 192</span>
2230
+
2231
+ <span class='kw'>def</span> <span class='id identifier rubyid_transport_for'>transport_for</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='label'>download:</span> <span class='kw'>false</span><span class='rparen'>)</span>
2232
+ <span class='kw'>return</span> <span class='ivar'>@transport</span> <span class='kw'>if</span> <span class='ivar'>@transport</span><span class='period'>.</span><span class='id identifier rubyid_compatible?'>compatible?</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
2233
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="BufferLimitError.html" title="Files::Transfer::BufferLimitError (class)">BufferLimitError</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="ClientTransport.html" title="Files::Transfer::ClientTransport (class)">ClientTransport</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ClientTransport.html#NOT_STREAMING-constant" title="Files::Transfer::ClientTransport::NOT_STREAMING (constant)">NOT_STREAMING</a></span></span> <span class='kw'>if</span> <span class='id identifier rubyid_download'>download</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='const'><span class='object_link'><a href="ClientTransport.html" title="Files::Transfer::ClientTransport (class)">ClientTransport</a></span></span><span class='period'>.</span><span class='id identifier rubyid_streams?'><span class='object_link'><a href="ClientTransport.html#streams%3F-class_method" title="Files::Transfer::ClientTransport.streams? (method)">streams?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
2234
+
2235
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
2236
+ <span class='ivar'>@client_transports</span><span class='lbracket'>[</span><span class='id identifier rubyid_client'>client</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='kw'>begin</span>
2237
+ <span class='id identifier rubyid_note'>note</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A caller&#39;s client with its own connection or request handling sends this job&#39;s content requests, one request at a time</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2238
+ <span class='const'><span class='object_link'><a href="ClientTransport.html" title="Files::Transfer::ClientTransport (class)">ClientTransport</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ClientTransport.html#initialize-instance_method" title="Files::Transfer::ClientTransport#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
2239
+ <span class='kw'>end</span>
2240
+ <span class='kw'>end</span>
2241
+ <span class='kw'>end</span></pre>
2242
+ </td>
2243
+ </tr>
2244
+ </table>
2245
+ </div>
2246
+
2247
+ <div class="method_details ">
2248
+ <h3 class="signature " id="wait-instance_method">
2249
+
2250
+ #<strong>wait</strong>(seconds = nil) &#x21d2; <tt>Object</tt>
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+ </h3><div class="docstring">
2257
+ <div class="discussion">
2258
+ <p>With the lock held: waits for a change, at most seconds when given, and never more than MAX_WAIT_SECONDS at a
2259
+ time when given; the caller looks at its deadline again after it.</p>
2260
+
2261
+ </div>
2262
+ </div>
2263
+ <div class="tags">
2264
+
2265
+
2266
+ </div><table class="source_code">
2267
+ <tr>
2268
+ <td>
2269
+ <pre class="lines">
2270
+
2271
+
2272
+ 165
2273
+ 166
2274
+ 167</pre>
2275
+ </td>
2276
+ <td>
2277
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 165</span>
2278
+
2279
+ <span class='kw'>def</span> <span class='id identifier rubyid_wait'>wait</span><span class='lparen'>(</span><span class='id identifier rubyid_seconds'>seconds</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2280
+ <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_wait'>wait</span><span class='lparen'>(</span><span class='ivar'>@lock</span><span class='comma'>,</span> <span class='id identifier rubyid_seconds'>seconds</span> <span class='op'>&amp;&amp;</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_seconds'>seconds</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#MAX_WAIT_SECONDS-constant" title="Files::Transfer::Job::MAX_WAIT_SECONDS (constant)">MAX_WAIT_SECONDS</a></span></span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span><span class='rparen'>)</span>
2281
+ <span class='kw'>end</span></pre>
2282
+ </td>
2283
+ </tr>
2284
+ </table>
2285
+ </div>
2286
+
2287
+ <div class="method_details ">
2288
+ <h3 class="signature " id="wake-instance_method">
2289
+
2290
+ #<strong>wake</strong> &#x21d2; <tt>Object</tt>
2291
+
2292
+
2293
+
2294
+
2295
+
2296
+ </h3><div class="docstring">
2297
+ <div class="discussion">
2298
+ <p>Called by the control after it changes.</p>
2299
+
2300
+ </div>
2301
+ </div>
2302
+ <div class="tags">
2303
+
2304
+
2305
+ </div><table class="source_code">
2306
+ <tr>
2307
+ <td>
2308
+ <pre class="lines">
2309
+
2310
+
2311
+ 155
2312
+ 156
2313
+ 157</pre>
2314
+ </td>
2315
+ <td>
2316
+ <pre class="code"><span class="info file"># File 'lib/files.com/transfer/job.rb', line 155</span>
2317
+
2318
+ <span class='kw'>def</span> <span class='id identifier rubyid_wake'>wake</span>
2319
+ <span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@changed</span><span class='period'>.</span><span class='id identifier rubyid_broadcast'>broadcast</span> <span class='rbrace'>}</span>
2320
+ <span class='kw'>end</span></pre>
2321
+ </td>
2322
+ </tr>
2323
+ </table>
2324
+ </div>
2325
+
2326
+ </div>
2327
+
2328
+ </div>
2329
+
2330
+ <div id="footer">
2331
+ Generated on Tue Nov 3 21:11:50 2026 by
2332
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2333
+ 0.9.45 (ruby-4.0.9).
2334
+ </div>
2335
+
2336
+ </div>
2337
+ </body>
2338
+ </html>