Class QueueDestination
java.lang.Object
io.github.flink.gcp.connector.cloudtasks.sink.QueueDestination
- All Implemented Interfaces:
Serializable
A fully-qualified Cloud Tasks queue reference: project, location and queue.
The location is part of the identity because queues are regional and one project may hold queues in several regions.
Instances are pure queue identity: equals(Object) and hashCode()
are defined over exactly (project, location, queue). Queue configuration — the rate limits and
the retry policy that pace dispatch — is not expressible here: it belongs to the queue itself and
is applied by whoever creates it, not by this sink.
Instances are immutable; the resource path and hash are precomputed, so they are cheap to use on the per-record write path. Resolvers should still cache and reuse instances instead of re-creating them per record.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the queue's location — the Google Cloud region, such asasia-northeast1, that holds the queue.Returns the Google Cloud project id, given as a bare id rather than a resource path.getQueue()Returns the queue id, given as a bare id rather than a resource path.inthashCode()static QueueDestinationCreates aQueueDestinationfrom bare ids, not resource paths.Returns the queue path in theprojects/PROJECT/locations/LOCATION/queues/QUEUEform used by the Cloud Tasks API.toString()
-
Method Details
-
of
Creates aQueueDestinationfrom bare ids, not resource paths.- Parameters:
project- the Google Cloud project idlocation- the queue's location (for exampleasia-northeast1)queue- the queue id- Returns:
- the destination
- Throws:
IllegalArgumentException- if a component is null or blank, has leading or trailing whitespace, or contains'/'— a separator would make the composed resource path address a different resource
-
getProject
Returns the Google Cloud project id, given as a bare id rather than a resource path. -
getLocation
Returns the queue's location — the Google Cloud region, such asasia-northeast1, that holds the queue. -
getQueue
Returns the queue id, given as a bare id rather than a resource path. -
toQueuePath
Returns the queue path in theprojects/PROJECT/locations/LOCATION/queues/QUEUEform used by the Cloud Tasks API. -
equals
-
hashCode
public int hashCode() -
toString
-