public interface ShardProvider
See https://cloud.google.com/spanner/docs/schema-design#fix_hash_the_key for more information on how logical shards should be implemented in Cloud Spanner.
| Modifier and Type | Method and Description |
|---|---|
void |
appendShardFilter(com.google.cloud.spanner.Statement.Builder statementBuilder)
Appends the required sharding filter to the given statement.
|
default String |
getColumnName()
Returns the name of the column that this shard provider uses.
|
com.google.cloud.spanner.Value |
getShardValue()
Returns the (fixed) value that is used by this
ShardProvider. |
void appendShardFilter(com.google.cloud.spanner.Statement.Builder statementBuilder)
@Nullable com.google.cloud.spanner.Value getShardValue()
ShardProvider. This value will be passed
to the CommitTimestampRepository to indicate the last seen commit timestamp for a
certain shard. This value will be null if the ShardProvider does not use a
fixed value.Copyright © 2022 Google LLC. All rights reserved.