Skip to content

Commit 71bd268

Browse files
committed
---
yaml --- r: 1003 b: refs/heads/master c: fc3a2d7 h: refs/heads/master i: 1001: b94b5cf 999: caa054c v: v3
1 parent 0c87857 commit 71bd268

18 files changed

Lines changed: 437 additions & 317 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: 469be5f9432fb261f8be70940f033fa87ed43666
2+
refs/heads/master: fc3a2d74dc5f3daf5d8c660e6fba571b55bda585
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/README.md

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
99

1010
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1111
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)
12+
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1213

1314
This client supports the following Google Cloud Platform services:
1415

1516
- [Google Cloud Datastore] (#google-cloud-datastore)
1617
- [Google Cloud Storage] (#google-cloud-storage)
1718

19+
<!---
20+
- [Google Cloud Storage] (https://cloud.google.com/storage/)
21+
--->
22+
1823
> Note: This client is a work-in-progress, and may occasionally
1924
> make backwards-incompatible changes.
2025
@@ -29,35 +34,28 @@ Add this to your pom.xml file
2934
</dependency>
3035
```
3136

37+
<!---
3238
Example Applications
3339
--------------------
3440
35-
- [`DatastoreExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/DatastoreExample.java) - A simple command line interface for the Cloud Datastore
36-
- Read more about using this application on the [`gcloud-java-examples` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/DatastoreExample.html).
37-
- [`StorageExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java) - A simple command line interface providing some of Cloud Storage's functionality
38-
- Read more about using this application on the [`gcloud-java-examples` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/StorageExample.html).
39-
40-
Authentication
41-
--------------
42-
43-
There are multiple ways to authenticate to use Google Cloud services.
44-
45-
1. When using `gcloud-java` libraries from within Compute/App Engine, no additional authentication steps are necessary.
46-
2. When using `gcloud-java` libraries elsewhere, there are two options:
47-
* [Generate a JSON service account key](https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts). Supply a path to the downloaded JSON credentials file when building the options supplied to datastore/storage constructor.
48-
* If running locally for development/testing, you can use use [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK authentication, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already. Then login using the SDK (`gcloud auth login` in command line), and set your current project using `gcloud config set project PROJECT_ID`.
41+
- `java-datastore-sample`_ - A sample using Cloud Datastore
42+
.. _java-datastore-sample: https://github.com/GoogleCloudPlatform/java-datastore-sample
43+
--->
4944

5045
Google Cloud Datastore
5146
----------------------
5247

53-
- [API Documentation][datastore-api]
54-
- [Official Documentation][cloud-datastore-docs]
55-
56-
*Follow the [activation instructions][cloud-datastore-activation] to use the Google Cloud Datastore API with your project.*
48+
[Google Cloud Datastore][cloud-datastore] is a fully managed, schemaless database for
49+
storing non-relational data. Cloud Datastore automatically scales with
50+
your users and supports ACID transactions, high availability of reads and
51+
writes, strong consistency for reads and ancestor queries, and eventual
52+
consistency for all other queries.
5753

58-
#### Preview
54+
See the [Google Cloud Datastore docs][cloud-datastore-activation] for more details on how to activate
55+
Cloud Datastore for your project.
5956

60-
Here is a code snippet showing a simple usage example from within Compute/App Engine. Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
57+
See the ``gcloud-java`` API [datastore documentation][datastore-api] to learn how to interact
58+
with the Cloud Datastore using this Client Library.
6159

6260
```java
6361
import com.google.gcloud.datastore.Datastore;
@@ -68,7 +66,8 @@ import com.google.gcloud.datastore.Entity;
6866
import com.google.gcloud.datastore.Key;
6967
import com.google.gcloud.datastore.KeyFactory;
7068

71-
Datastore datastore = DatastoreFactory.instance().get(DatastoreOptions.getDefaultInstance());
69+
DatastoreOptions options = DatastoreOptions.builder().projectId(PROJECT_ID).build();
70+
Datastore datastore = DatastoreFactory.instance().get(options);
7271
KeyFactory keyFactory = datastore.newKeyFactory().kind(KIND);
7372
Key key = keyFactory.newKey(keyName);
7473
Entity entity = datastore.get(key);
@@ -91,14 +90,16 @@ if (entity == null) {
9190
Google Cloud Storage
9291
----------------------
9392

94-
- [API Documentation][storage-api]
95-
- [Official Documentation][cloud-storage-docs]
93+
[Google Cloud Storage][cloud-storage] is a durable and highly available
94+
object storage service. Google Cloud Storage is almost infinitely scalable
95+
and guarantees consistency: when a write succeeds, the latest copy of the
96+
object will be returned to any GET, globally.
9697

97-
*Follow the [activation instructions][cloud-storage-activation] to use the Google Cloud Storage API with your project.*
98+
See the [Google Cloud Storage docs][cloud-storage-activation] for more details on how to activate
99+
Cloud Storage for your project.
98100

99-
#### Preview
100-
101-
Here is a code snippet showing a simple usage example from within Compute/App Engine. Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
101+
See the ``gcloud-java`` API [storage documentation][storage-api] to learn how to interact
102+
with the Cloud Storage using this Client Library.
102103

103104
```java
104105
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -111,7 +112,8 @@ import com.google.gcloud.storage.StorageOptions;
111112
import java.nio.ByteBuffer;
112113
import java.nio.channels.WritableByteChannel;
113114

114-
Storage storage = StorageFactory.instance().get(StorageOptions.getDefaultInstance());
115+
StorageOptions options = StorageOptions.builder().projectId(PROJECT_ID).build();
116+
Storage storage = StorageFactory.instance().get(options);
115117
Blob blob = new Blob(storage, "bucket", "blob_name");
116118
if (!blob.exists()) {
117119
storage2.create(blob.info(), "Hello, Cloud Storage!".getBytes(UTF_8));
@@ -125,27 +127,13 @@ if (!blob.exists()) {
125127
}
126128
```
127129

128-
Java Versions
129-
-------------
130-
131-
Java 7 or above is required for using this client.
132-
133130
Testing
134131
-------
135132

136133
This library provides tools to help write tests for code that uses gcloud-java services.
137134

138135
See [TESTING] to read more about using our testing helpers.
139136

140-
Versioning
141-
----------
142-
143-
This library follows [Semantic Versioning] (http://semver.org/).
144-
145-
It is currently in major version zero (``0.y.z``), which means that anything
146-
may change at any time and the public API should not be considered
147-
stable.
148-
149137
Contributing
150138
------------
151139

@@ -155,6 +143,20 @@ See [CONTRIBUTING] for more information on how to get started.
155143

156144
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.
157145

146+
Java Versions
147+
-------------
148+
149+
Java 7 or above is required for using this client.
150+
151+
Versioning
152+
----------
153+
154+
This library follows [Semantic Versioning] (http://semver.org/).
155+
156+
It is currently in major version zero (``0.y.z``), which means that anything
157+
may change at any time and the public API should not be considered
158+
stable.
159+
158160
License
159161
-------
160162

trunk/RELEASING.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

trunk/gcloud-java-core/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Google Cloud Java Client -- Core
1+
Google Cloud Java Client -- Core Services
22
=========================================
33

44
This module provides common functionality required by service-specific modules of this library.
55

66
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
8-
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-core.svg)](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-core.svg)
98

109
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1110
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html)
11+
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1212

1313
Quickstart
1414
----------
@@ -21,18 +21,18 @@ Add this to your pom.xml file
2121
</dependency>
2222
```
2323

24-
Java Versions
25-
-------------
26-
27-
Java 7 or above is required for using this client.
28-
2924
Contributing
3025
------------
3126

3227
Contributions to this library are always welcome and highly encouraged.
3328

3429
See [CONTRIBUTING] for more information on how to get started.
3530

31+
Java Versions
32+
-------------
33+
34+
Java 7 or above is required for using this client.
35+
3636
Versioning
3737
----------
3838

trunk/gcloud-java-core/src/main/java/com/google/gcloud/RetryParams.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public final class RetryParams implements Serializable {
6666
private static final RetryParams NO_RETRIES =
6767
builder().retryMaxAttempts(1).retryMinAttempts(1).build();
6868

69+
6970
/**
7071
* RetryParams builder.
7172
*/
@@ -205,53 +206,47 @@ public static RetryParams getDefaultInstance() {
205206
return DEFAULT_INSTANCE;
206207
}
207208

208-
/**
209-
* Returns an instance of {@code RetryParams} where `retryMaxAttempts` and `retryMinAttempts` are
210-
* set to `1`.
211-
*/
212209
public static RetryParams noRetries() {
213210
return NO_RETRIES;
214211
}
215212

216213
/**
217-
* Returns the retryMinAttempts. Default value is {@value #DEFAULT_RETRY_MIN_ATTEMPTS}.
214+
* Returns the retryMinAttempts.
218215
*/
219216
public int getRetryMinAttempts() {
220217
return retryMinAttempts;
221218
}
222219

223220
/**
224-
* Returns the retryMaxAttempts. Default value is {@value #DEFAULT_RETRY_MAX_ATTEMPTS}.
221+
* Returns the retryMaxAttempts.
225222
*/
226223
public int getRetryMaxAttempts() {
227224
return retryMaxAttempts;
228225
}
229226

230227
/**
231-
* Returns the initialRetryDelayMillis. Default value is
232-
* {@value #DEFAULT_INITIAL_RETRY_DELAY_MILLIS}.
228+
* Returns the initialRetryDelayMillis.
233229
*/
234230
public long getInitialRetryDelayMillis() {
235231
return initialRetryDelayMillis;
236232
}
237233

238234
/**
239-
* Returns the maxRetryDelayMillis. Default values is {@value #DEFAULT_MAX_RETRY_DELAY_MILLIS}.
235+
* Returns the maxRetryDelayMillis.
240236
*/
241237
public long getMaxRetryDelayMillis() {
242238
return maxRetryDelayMillis;
243239
}
244240

245241
/**
246-
* Returns the maxRetryDelayBackoffFactor. Default values is
247-
* {@value #DEFAULT_RETRY_DELAY_BACKOFF_FACTOR}.
242+
* Returns the maxRetryDelayBackoffFactor.
248243
*/
249244
public double getRetryDelayBackoffFactor() {
250245
return retryDelayBackoffFactor;
251246
}
252247

253248
/**
254-
* Returns the totalRetryPeriodMillis. Default value is {@value #DEFAULT_TOTAL_RETRY_PERIOD_MILLIS}.
249+
* Returns the totalRetryPeriodMillis.
255250
*/
256251
public long getTotalRetryPeriodMillis() {
257252
return totalRetryPeriodMillis;

0 commit comments

Comments
 (0)