Class TimebasedShardProvider

  • All Implemented Interfaces:
    ShardProvider

    public final class TimebasedShardProvider
    extends Object
    implements ShardProvider
    Implementation of ShardProvider that generates a ShardId based on the current system time of Cloud Spanner. The generated shard id groups a set of commit timestamps together. The TimebasedShardProvider can only be used when all clients that write to the tables that are being watched update the shard column with the most recent shard id for each update that is written to the tables.
    See Also:
    for an example on how to use this .