Home | Trees | Indices | Help |
---|
|
builtins.object --+ | ArvadosFile
Represent a file in a Collection.
ArvadosFile manages the underlying representation of a file in Keep as a sequence of segments spanning a set of blocks, and implements random read/write access.
This object may be accessed from multiple threads.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
ArvadosFile constructor. :stream: a list of Range objects representing a block stream :segments: a list of Range objects representing segments |
Returns True if any of the segment's locators is expired
|
Returns True if any of the segment's locators has a +R signature
|
Ask Keep to copy remote blocks and point to their local copies. This is called from the parent Collection. :remote_blocks: Shared cache of remote to local block mappings. This is used to avoid doing extra work when blocks are shared by more than one file in different subdirectories.
|
|
Make a copy of this file.
|
Replace segments of this file with segments from another `ArvadosFile` object.
|
|
Set committed flag. If value is True, set committed to be True. If value is False, set committed to be False for this and all parents.
|
Get whether this is committed or not.
|
Add an ArvadosFileWriter reference to the list of writers
|
Called from ArvadosFileWriter.close(). Remove a writer reference from the list and do some block maintenance tasks.
|
Get whether this is closed or not. When the writers list is empty, the file is supposed to be closed. |
Shrink or expand the size of the file. If `size` is less than the size of the file, the file contents after `size` will be discarded. If `size` is greater than the current size of the file, it will be filled with zero bytes.
|
Read up to `size` bytes from the file starting at `offset`. :exact: If False (default), return less data than requested if the read crosses a block boundary and the next block isn't cached. If True, only return less data than requested when hitting EOF. |
Write `data` to the file starting at `offset`. This will update existing bytes and/or extend the size of the file as necessary.
|
Flush the current bufferblock to Keep. :sync: If True, commit block synchronously, wait until buffer block has been written. If False, commit block asynchronously, return immediately after putting block into the keep put queue.
|
Add a segment to the end of the file. `pos` and `offset` reference a section of the stream described by `blocks` (a list of Range objects)
|
Get the file size.
|
|
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 21 19:09:45 2023 | http://epydoc.sourceforge.net |