Skip to content

Commit d0201fd

Browse files
committed
---
yaml --- r: 2173 b: refs/heads/pubsub-alpha c: 397b2c1 h: refs/heads/master i: 2171: 9801f08
1 parent 2ee1030 commit d0201fd

21 files changed

Lines changed: 152 additions & 39 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ refs/heads/master: 689bbb466df4b2d5d2483d6edb8ac5c7c7f7c6fa
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
6-
refs/heads/pubsub-alpha: b32e4b94a31584ea93b10c0cb3a87525c39df3e5
6+
refs/heads/pubsub-alpha: 397b2c1e63cbf124ea21f7ea820547a803b5b1ab
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
88
refs/heads/update-datastore: 482954f2c5055231e5b3122ea91d2ba00ce8187c
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

branches/pubsub-alpha/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,25 @@ If you are using Maven, add this to your pom.xml file
2727
<dependency>
2828
<groupId>com.google.gcloud</groupId>
2929
<artifactId>gcloud-java</artifactId>
30-
<version>0.1.1</version>
30+
<version>0.1.2</version>
3131
</dependency>
3232
```
3333
If you are using Gradle, add this to your dependencies
3434
```Groovy
35-
compile 'com.google.gcloud:gcloud-java:0.1.1'
35+
compile 'com.google.gcloud:gcloud-java:0.1.2'
3636
```
3737
If you are using SBT, add this to your dependencies
3838
```Scala
39-
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.1.1"
39+
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.1.2"
4040
```
4141

4242
Example Applications
4343
--------------------
4444

4545
- [`BigQueryExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/BigQueryExample.java) - A simple command line interface providing some of Cloud BigQuery's functionality
4646
- Read more about using this application on the [`gcloud-java-examples` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/BigQueryExample.html).
47+
- [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/bookshelf) - An App Engine app that manages a virtual bookshelf.
48+
- This app uses `gcloud-java` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service.
4749
- [`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
4850
- 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).
4951
- [`ResourceManagerExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/ResourceManagerExample.java) - A simple command line interface providing some of Cloud Resource Manager's functionality

branches/pubsub-alpha/gcloud-java-bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ If you are using Maven, add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-bigquery</artifactId>
23-
<version>0.1.1</version>
23+
<version>0.1.2</version>
2424
</dependency>
2525
```
2626
If you are using Gradle, add this to your dependencies
2727
```Groovy
28-
compile 'com.google.gcloud:gcloud-java-bigquery:0.1.1'
28+
compile 'com.google.gcloud:gcloud-java-bigquery:0.1.2'
2929
```
3030
If you are using SBT, add this to your dependencies
3131
```Scala
32-
libraryDependencies += "com.google.gcloud" % "gcloud-java-bigquery" % "0.1.1"
32+
libraryDependencies += "com.google.gcloud" % "gcloud-java-bigquery" % "0.1.2"
3333
```
3434

3535
Example Application

branches/pubsub-alpha/gcloud-java-bigquery/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.1.2-SNAPSHOT</version>
14+
<version>0.1.3-SNAPSHOT</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>gcloud-java-bigquery</site.installationModule>

branches/pubsub-alpha/gcloud-java-core/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ If you are using Maven, add this to your pom.xml file
1717
<dependency>
1818
<groupId>com.google.gcloud</groupId>
1919
<artifactId>gcloud-java-core</artifactId>
20-
<version>0.1.1</version>
20+
<version>0.1.2</version>
2121
</dependency>
2222
```
2323
If you are using Gradle, add this to your dependencies
2424
```Groovy
25-
compile 'com.google.gcloud:gcloud-java-core:0.1.1'
25+
compile 'com.google.gcloud:gcloud-java-core:0.1.2'
2626
```
2727
If you are using SBT, add this to your dependencies
2828
```Scala
29-
libraryDependencies += "com.google.gcloud" % "gcloud-java-core" % "0.1.1"
29+
libraryDependencies += "com.google.gcloud" % "gcloud-java-core" % "0.1.2"
3030
```
3131

3232
Troubleshooting

branches/pubsub-alpha/gcloud-java-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.1.2-SNAPSHOT</version>
14+
<version>0.1.3-SNAPSHOT</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>gcloud-java-core</site.installationModule>

branches/pubsub-alpha/gcloud-java-datastore/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ If you are using Maven, add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-datastore</artifactId>
23-
<version>0.1.1</version>
23+
<version>0.1.2</version>
2424
</dependency>
2525
```
2626
If you are using Gradle, add this to your dependencies
2727
```Groovy
28-
compile 'com.google.gcloud:gcloud-java-datastore:0.1.1'
28+
compile 'com.google.gcloud:gcloud-java-datastore:0.1.2'
2929
```
3030
If you are using SBT, add this to your dependencies
3131
```Scala
32-
libraryDependencies += "com.google.gcloud" % "gcloud-java-datastore" % "0.1.1"
32+
libraryDependencies += "com.google.gcloud" % "gcloud-java-datastore" % "0.1.2"
3333
```
3434

3535
Example Application

branches/pubsub-alpha/gcloud-java-datastore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.1.2-SNAPSHOT</version>
14+
<version>0.1.3-SNAPSHOT</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>gcloud-java-datastore</site.installationModule>

branches/pubsub-alpha/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/QueryResults.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
* The result of a Google Cloud Datastore query submission.
2323
* When the result is not typed it is possible to cast it to its appropriate type according to
2424
* the {@link #resultClass} value.
25-
* Results are loaded lazily; therefore it is possible to get a {@code DatastoreException}
26-
* upon {@link Iterator#hasNext hasNext} or {@link Iterator#next next} calls.
25+
* Results are loaded lazily in batches, where batch size is set by Cloud Datastore. As a result, it
26+
* is possible to get a {@code DatastoreException} upon {@link Iterator#hasNext hasNext} or
27+
* {@link Iterator#next next} calls.
2728
*
2829
* @param <V> the type of the results value.
2930
*/
@@ -35,8 +36,8 @@ public interface QueryResults<V> extends Iterator<V> {
3536
Class<?> resultClass();
3637

3738
/**
38-
* Returns the Cursor for point after the value returned in the last {@link #next} call.
39-
* Not currently implemented (depends on v1beta3).
39+
* Returns the Cursor for the point after the value returned in the last {@link #next} call.
40+
* Currently, {@code cursorAfter} returns null in all cases but the last result.
4041
*/
4142
Cursor cursorAfter();
4243
}

branches/pubsub-alpha/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/QueryResultsImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.google.common.base.Preconditions;
2222
import com.google.common.collect.AbstractIterator;
2323
import com.google.gcloud.datastore.Query.ResultType;
24+
import com.google.protobuf.ByteString;
2425

2526
import java.util.Iterator;
2627
import java.util.Objects;
@@ -36,7 +37,7 @@ class QueryResultsImpl<T> extends AbstractIterator<T> implements QueryResults<T>
3637
private DatastoreV1.QueryResultBatch queryResultBatchPb;
3738
private boolean lastBatch;
3839
private Iterator<DatastoreV1.EntityResult> entityResultPbIter;
39-
//private ByteString cursor; // only available in v1beta3
40+
private ByteString cursor; // only available in v1beta3
4041

4142

4243
QueryResultsImpl(DatastoreImpl datastore, DatastoreV1.ReadOptions readOptionsPb,
@@ -83,6 +84,7 @@ protected T computeNext() {
8384
sendRequest();
8485
}
8586
if (!entityResultPbIter.hasNext()) {
87+
cursor = queryResultBatchPb.getEndCursor();
8688
return endOfData();
8789
}
8890
DatastoreV1.EntityResult entityResultPb = entityResultPbIter.next();
@@ -99,7 +101,7 @@ public Class<?> resultClass() {
99101

100102
@Override
101103
public Cursor cursorAfter() {
104+
return cursor == null ? null : new Cursor(cursor);
102105
//return new Cursor(cursor); // only available in v1beta3
103-
return null;
104106
}
105107
}

0 commit comments

Comments
 (0)