public class Sink extends SinkInfo
Sink destination can either be a Google Cloud Storage bucket (see
SinkInfo.Destination.BucketDestination, a Google Cloud BigQuery dataset (see
SinkInfo.Destination.DatasetDestination) or a Google CloudPub/Sub topic (see
SinkInfo.Destination.TopicDestination).
Sink adds a layer of service-related functionality over SinkInfo. Objects of
this class are immutable. To get a Sink object with the most recent information use
reload() or reloadAsync().
| Modifier and Type | Class and Description |
|---|---|
static class |
Sink.Builder
A builder for
Sink objects. |
SinkInfo.Destination, SinkInfo.VersionFormat| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
Deletes this sink.
|
Future<Boolean> |
deleteAsync()
Sends a request for deleting this sink.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Logging |
logging()
Returns the sinks's
Logging object used to issue requests. |
Sink |
reload()
Fetches current sink's latest information.
|
Future<Sink> |
reloadAsync()
Sends a request to fetch current sink's latest information.
|
Sink.Builder |
toBuilder()
Returns a builder for this
SinkInfo object. |
Sink |
update(SinkInfo sinkInfo)
Updates current sink.
|
Future<Sink> |
updateAsync(SinkInfo sinkInfo)
Sends a request to update current sink.
|
builder, destination, filter, name, of, toString, versionFormatpublic Sink.Builder toBuilder()
SinkInfoSinkInfo object.public Logging logging()
Logging object used to issue requests.public boolean delete()
true if the sink was deleted, false if it was not foundLoggingException - upon failurepublic Future<Boolean> deleteAsync()
Future object to consume
the result. Future.get() returns true if the sink was deleted, false
if it was not found.LoggingException - upon failurepublic Sink reload()
null if the sink does not exist.Sink object with latest information or null if not foundLoggingException - upon failurepublic Future<Sink> reloadAsync()
Future object to consume the result. Future.get() returns a Sink object
with latest information or null if not found.LoggingException - upon failurepublic Sink update(SinkInfo sinkInfo)
Sink object with updated informationLoggingException - upon failurepublic Future<Sink> updateAsync(SinkInfo sinkInfo)
Future object to consume the result. Future.get() returns a
Sink object with updated information.LoggingException - upon failureCopyright © 2016 Google. All rights reserved.