Class TimebasedShardProvider.TimebasedShardId

  • Enclosing class:
    TimebasedShardProvider

    public static final class TimebasedShardProvider.TimebasedShardId
    extends Object
    A generated timebased shard id that has been fetched from Cloud Spanner.
    • Method Detail

      • shouldRefresh

        public boolean shouldRefresh()
        Returns true if this TimebasedShardProvider.TimebasedShardId should be refreshed based on the current system time. This method depends on the current system time. If the system time is too much out of sync with the actual time, it can return invalid values. A system time that is less than 10 seconds out of sync is not a problem.
      • getValue

        public com.google.cloud.spanner.Value getValue()
        Returns the Value that should be used to set on a Mutation when an insert/update is sent to the database.