Class SpannerClientMetricsConfig
java.lang.Object
io.github.flink.gcp.connector.spanner.table.SpannerClientMetricsConfig
- All Implemented Interfaces:
Serializable
The two client-metrics options of a Spanner table, as a table declared them.
One value rather than two fields on every table source and sink, because all of them carry both to every component that builds a client: the sink writer, the scan's enumerator and readers through the DataStream builders, and the lookup functions directly. A key the table leaves out stays unset, so a builder keeps its own default.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidHands each declared option to a builder's setter, under its key if the setter refuses it.booleanbooleanReturns whether the client takes part in the Cloud Monitoring export, the default when unset.booleanReturns whether the client metrics are exported to Flink, the default when unset.static SpannerClientMetricsConfigfrom(org.apache.flink.configuration.ReadableConfig config) Reads both options from a table's configuration.inthashCode()static SpannerClientMetricsConfigunset()Returns the options of a table that declares neither, so every builder keeps its default.
-
Method Details
-
unset
Returns the options of a table that declares neither, so every builder keeps its default. -
from
Reads both options from a table's configuration.- Parameters:
config- the table's options- Returns:
- the options as declared
-
applyTo
Hands each declared option to a builder's setter, under its key if the setter refuses it.- Parameters:
toFlink- the builder'sexportClientMetricsToFlinktoCloudMonitoring- the builder'sexportClientMetricsToCloudMonitoring
-
exportToFlink
public boolean exportToFlink()Returns whether the client metrics are exported to Flink, the default when unset. -
exportToCloudMonitoring
public boolean exportToCloudMonitoring()Returns whether the client takes part in the Cloud Monitoring export, the default when unset. -
equals
-
hashCode
public int hashCode()
-