Commit 6b4faac 1 parent fd061e1 commit 6b4faac Copy full SHA for 6b4faac
File tree 6 files changed +15
-4
lines changed
google-cloud-spanner/src/main/java/com/google/cloud/spanner
6 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ public ResultSetMetadata getMetadata() {
615
615
return delegateResultSet .get ().getMetadata ();
616
616
}
617
617
618
- public boolean initiateStreaming (StreamMessageListener streamMessageListener ) {
618
+ boolean initiateStreaming (StreamMessageListener streamMessageListener ) {
619
619
return StreamingUtil .initiateStreaming (delegateResultSet .get (), streamMessageListener );
620
620
}
621
621
Original file line number Diff line number Diff line change 16
16
17
17
package com .google .cloud .spanner ;
18
18
19
+ import com .google .api .core .InternalApi ;
19
20
import com .google .common .base .Preconditions ;
20
21
import com .google .common .base .Supplier ;
21
22
import com .google .common .base .Suppliers ;
@@ -105,6 +106,7 @@ public ResultSetMetadata getMetadata() {
105
106
}
106
107
107
108
@ Override
109
+ @ InternalApi
108
110
public boolean initiateStreaming (AsyncResultSet .StreamMessageListener streamMessageListener ) {
109
111
return StreamingUtil .initiateStreaming (delegate .get (), streamMessageListener );
110
112
}
Original file line number Diff line number Diff line change 19
19
import static com .google .cloud .spanner .SpannerExceptionFactory .newSpannerException ;
20
20
import static com .google .common .base .Preconditions .checkState ;
21
21
22
+ import com .google .api .core .InternalApi ;
22
23
import com .google .common .annotations .VisibleForTesting ;
23
24
import com .google .protobuf .Value ;
24
25
import com .google .spanner .v1 .PartialResultSet ;
@@ -125,6 +126,7 @@ public ResultSetMetadata getMetadata() {
125
126
}
126
127
127
128
@ Override
129
+ @ InternalApi
128
130
public boolean initiateStreaming (AsyncResultSet .StreamMessageListener streamMessageListener ) {
129
131
return iterator .initiateStreaming (streamMessageListener );
130
132
}
Original file line number Diff line number Diff line change 20
20
import com .google .cloud .spanner .AbstractResultSet .CloseableIterator ;
21
21
import com .google .cloud .spanner .spi .v1 .SpannerRpc ;
22
22
import com .google .common .annotations .VisibleForTesting ;
23
+ import com .google .common .base .Preconditions ;
23
24
import com .google .common .collect .AbstractIterator ;
24
25
import com .google .common .util .concurrent .Uninterruptibles ;
25
26
import com .google .spanner .v1 .PartialResultSet ;
@@ -68,8 +69,8 @@ protected final SpannerRpc.ResultStreamConsumer consumer() {
68
69
return consumer ;
69
70
}
70
71
71
- public void registerListener (AsyncResultSet .StreamMessageListener streamMessageListener ) {
72
- this .streamMessageListener = streamMessageListener ;
72
+ void registerListener (AsyncResultSet .StreamMessageListener streamMessageListener ) {
73
+ this .streamMessageListener = Preconditions . checkNotNull ( streamMessageListener ) ;
73
74
}
74
75
75
76
public void setCall (SpannerRpc .StreamingCall call , boolean withBeginTransaction ) {
Original file line number Diff line number Diff line change 16
16
17
17
package com .google .cloud .spanner ;
18
18
19
+ import com .google .api .core .InternalApi ;
20
+
19
21
/** Streaming implementation of ResultSet that supports streaming of chunks */
20
22
interface StreamingResultSet extends ResultSet {
21
23
22
24
/**
23
25
* Returns the {@link boolean} for this {@link ResultSet}. This method will be used by
24
26
* AsyncResultSet to initiate gRPC streaming
25
27
*/
28
+ @ InternalApi
26
29
boolean initiateStreaming (AsyncResultSet .StreamMessageListener streamMessageListener );
27
30
}
Original file line number Diff line number Diff line change 16
16
17
17
package com .google .cloud .spanner ;
18
18
19
- class StreamingUtil {
19
+ final class StreamingUtil {
20
+
21
+ private StreamingUtil () {}
22
+
20
23
static boolean initiateStreaming (
21
24
ResultSet resultSet , AsyncResultSet .StreamMessageListener streamMessageListener ) {
22
25
if (resultSet instanceof StreamingResultSet ) {
You can’t perform that action at this time.
0 commit comments