New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Blob API Doc is confusing #233
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ce34eb4
fix: blob api doc is confusing
dmitry-fa bec01a3
fix: blob api doc is confusing
dmitry-fa a49ac68
fix: blob api doc is confusing
dmitry-fa 754c6c8
fix: blob api doc is confusing
dmitry-fa 4d37e98
fix: deprecate blob.update() and modify documentation of storage.upda…
dmitry-fa File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,26 @@ | |
import java.util.concurrent.TimeUnit; | ||
|
||
/** | ||
* A Google cloud storage object. | ||
* A Google cloud storage object. A {@code Blob} object includes the {@code BlobId} instance, the | ||
* set of properties inherited from the {@link BlobInfo} class and the {@code Storage} instance. The | ||
* class provides methods to perform operations on the object. Reading a property value does not | ||
* issue any RPC calls. The object content is not stored within the {@code Blob} instance, | ||
dmitry-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* operations on obtaining the content will issue one or multiple RPC calls, depending on the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Operations that access the content issue... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. But access the content issue might sound confusing. |
||
* content size. | ||
* | ||
* <p>Objects of this class are immutable. Operations that modify the blob like {@link #update} and | ||
* {@link #copyTo} return a new object. To get a {@code Blob} object with the most recent | ||
* information use {@link #reload}. {@code Blob} adds a layer of service-related functionality over | ||
* {@link BlobInfo}. | ||
* {@link #copyTo} return a new object. Any changes to a Storage object made after creation of the | ||
dmitry-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* {@code Blob} is not visible in the {@code Blob}. To get a {@code Blob} object with the most | ||
dmitry-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* recent information use {@link #reload}. | ||
* | ||
* <p>Example of getting the content of a Storage object: | ||
dmitry-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* | ||
* <pre>{@code | ||
* BlobId blobId = BlobId.of(bucketName, blobName); | ||
* Blob blob = storage.get(blobId); | ||
* long size = blob.getSize(); // no RPC call is required | ||
* byte[] content = blob.getContent(); // one or multiple RPC calls will be issued | ||
* }</pre> | ||
*/ | ||
public class Blob extends BlobInfo { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be very careful with the word "object". This is very easy to confuse wit an instance of the Storage class. I suggest using the phrase "an object in Google Cloud Storage" when you mean the bytes on the server rather than "storage object" which sounds like an instance of a class.
The overloading of the word "object" is really annoying. GCS should never have called these things "objects" but that ship, I am afraid, has sailed and we can't fix it here. :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree