Class SpannerOptions.SpannerCallContextTimeoutConfigurator (6.102.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 6.102.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   class  SpannerOptions . SpannerCallContextTimeoutConfigurator   implements   SpannerOptions . CallContextConfigurator  
  Helper class to configure timeouts for specific Spanner RPCs. The SpannerCallContextTimeoutConfigurator  must be set as a value on the Context  using the
 SpannerOptions#CALL_CONTEXT_CONFIGURATOR_KEY  key.
 
Example usage:
 
  // Create a context with a ExecuteQuery timeout of 10 seconds. 
  Context   context   = 
      Context . current () 
          . withValue ( 
              SpannerOptions . CALL_CONTEXT_CONFIGURATOR_KEY , 
              SpannerCallContextTimeoutConfigurator . create () 
                  . withExecuteQueryTimeout ( Duration . ofSeconds ( 10L ))); 
  context . run ( 
      ()   - >  { 
        try   ( ResultSet   rs   = 
            client 
                . singleUse () 
                . executeQuery ( 
                    Statement . of ( 
                        "SELECT SingerId, FirstName, LastName FROM Singers ORDER BY LastName" )))   { 
          while   ( rs . next ())   { 
            System . out . printf ( "%d %s %s%n" ,   rs . getLong ( 0 ),   rs . getString ( 1 ),   rs . getString ( 2 )); 
          } 
        }   catch   ( SpannerException   e )   { 
          if   ( e . getErrorCode ()   ==   ErrorCode . DEADLINE_EXCEEDED )   { 
            // Handle timeout. 
          } 
        } 
      } 
  
    Inheritance 
    java.lang.Object  >  
    SpannerOptions.SpannerCallContextTimeoutConfigurator 
   
  
  
  Static Methods
   
  create() 
  
    
public   static   SpannerOptions . SpannerCallContextTimeoutConfigurator   create ()  
  
  Methods
   
  <ReqT,RespT>configure(ApiCallContext context, ReqT request, MethodDescriptor<ReqT,RespT> method) 
  
    
public   ApiCallContext   <ReqT , RespT>configure ( ApiCallContext   context ,   ReqT   request ,   MethodDescriptor<ReqT , RespT >  method )  
  
  
    
      
        Parameters  
      
        Name Description  
      
        contextApiCallContext  
      
        requestReqT  
      
        methodio.grpc.MethodDescriptor <ReqT ,RespT > 
     
  
  
  getBatchUpdateTimeout() 
  
    
public   Duration   getBatchUpdateTimeout ()  
  
Obsolete 
Use getBatchUpdateTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getBatchUpdateTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getBatchUpdateTimeoutDuration() 
  
    
public   Duration   getBatchUpdateTimeoutDuration ()  
  
  getCommitTimeout() 
  
    
public   Duration   getCommitTimeout ()  
  
Obsolete 
Use getCommitTimeoutDuration() instead. 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getCommitTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getCommitTimeoutDuration() 
  
    
public   Duration   getCommitTimeoutDuration ()  
  
  getExecuteQueryTimeout() 
  
    
public   Duration   getExecuteQueryTimeout ()  
  
Obsolete 
Use getExecuteQueryTimeoutDuration() instead. 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getExecuteQueryTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getExecuteQueryTimeoutDuration() 
  
    
public   Duration   getExecuteQueryTimeoutDuration ()  
  
  getExecuteUpdateTimeout() 
  
    
public   Duration   getExecuteUpdateTimeout ()  
  
Obsolete 
Use getExecuteUpdateTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getExecuteUpdateTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getExecuteUpdateTimeoutDuration() 
  
    
public   Duration   getExecuteUpdateTimeoutDuration ()  
  
  getPartitionQueryTimeout() 
  
    
public   Duration   getPartitionQueryTimeout ()  
  
Obsolete 
Use getPartitionQueryTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getPartitionQueryTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getPartitionQueryTimeoutDuration() 
  
    
public   Duration   getPartitionQueryTimeoutDuration ()  
  
  getPartitionReadTimeout() 
  
    
public   Duration   getPartitionReadTimeout ()  
  
Obsolete 
Use getPartitionReadTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getPartitionReadTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getPartitionReadTimeoutDuration() 
  
    
public   Duration   getPartitionReadTimeoutDuration ()  
  
  getReadTimeout() 
  
    
public   Duration   getReadTimeout ()  
  
Obsolete 
Use getReadTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getReadTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getReadTimeoutDuration() 
  
    
public   Duration   getReadTimeoutDuration ()  
  
  getRollbackTimeout() 
  
    
public   Duration   getRollbackTimeout ()  
  
Obsolete 
Use getRollbackTimeoutDuration() instead. 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #getRollbackTimeoutDuration()  instead.
    
      
        Returns  
      
        Type Description  
      
        org.threeten.bp.Duration  
     
  
  getRollbackTimeoutDuration() 
  
    
public   Duration   getRollbackTimeoutDuration ()  
  
  withBatchUpdateTimeout(Duration batchUpdateTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withBatchUpdateTimeout ( Duration   batchUpdateTimeout )  
  
Obsolete 
Use withBatchUpdateTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withBatchUpdateTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        batchUpdateTimeoutorg.threeten.bp.Duration  
     
  
  
  withBatchUpdateTimeoutDuration(Duration batchUpdateTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withBatchUpdateTimeoutDuration ( Duration   batchUpdateTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        batchUpdateTimeoutDuration  
     
  
  
  withCommitTimeout(Duration commitTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withCommitTimeout ( Duration   commitTimeout )  
  
Obsolete 
Use withCommitTimeoutDuration() instead. 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withCommitTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        commitTimeoutorg.threeten.bp.Duration  
     
  
  
  withCommitTimeoutDuration(Duration commitTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withCommitTimeoutDuration ( Duration   commitTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        commitTimeoutDuration  
     
  
  
  withExecuteQueryTimeout(Duration executeQueryTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withExecuteQueryTimeout ( Duration   executeQueryTimeout )  
  
Obsolete 
Use withExecuteQueryTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withExecuteQueryTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        executeQueryTimeoutorg.threeten.bp.Duration  
     
  
  
  withExecuteQueryTimeoutDuration(Duration executeQueryTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withExecuteQueryTimeoutDuration ( Duration   executeQueryTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        executeQueryTimeoutDuration  
     
  
  
  withExecuteUpdateTimeout(Duration executeUpdateTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withExecuteUpdateTimeout ( Duration   executeUpdateTimeout )  
  
Obsolete 
Use withExecuteUpdateTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withExecuteUpdateTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        executeUpdateTimeoutorg.threeten.bp.Duration  
     
  
  
  withExecuteUpdateTimeoutDuration(Duration executeUpdateTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withExecuteUpdateTimeoutDuration ( Duration   executeUpdateTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        executeUpdateTimeoutDuration  
     
  
  
  withPartitionQueryTimeout(Duration partitionQueryTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withPartitionQueryTimeout ( Duration   partitionQueryTimeout )  
  
Obsolete 
Use withPartitionQueryTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withPartitionQueryTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        partitionQueryTimeoutorg.threeten.bp.Duration  
     
  
  
  withPartitionQueryTimeoutDuration(Duration partitionQueryTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withPartitionQueryTimeoutDuration ( Duration   partitionQueryTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        partitionQueryTimeoutDuration  
     
  
  
  withPartitionReadTimeout(Duration partitionReadTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withPartitionReadTimeout ( Duration   partitionReadTimeout )  
  
Obsolete 
Use withPartitionReadTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withPartitionReadTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        partitionReadTimeoutorg.threeten.bp.Duration  
     
  
  
  withPartitionReadTimeoutDuration(Duration partitionReadTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withPartitionReadTimeoutDuration ( Duration   partitionReadTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        partitionReadTimeoutDuration  
     
  
  
  withReadTimeout(Duration readTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withReadTimeout ( Duration   readTimeout )  
  
Obsolete 
Use withReadTimeoutDuration() instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withReadTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        readTimeoutorg.threeten.bp.Duration  
     
  
  
  withReadTimeoutDuration(Duration readTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withReadTimeoutDuration ( Duration   readTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        readTimeoutDuration  
     
  
  
  withRollbackTimeout(Duration rollbackTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withRollbackTimeout ( Duration   rollbackTimeout )  
  
Obsolete 
Use withRollbackTimeoutDuration() instead. 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #withRollbackTimeoutDuration(Duration)  instead.
    
      
        Parameter  
      
        Name Description  
      
        rollbackTimeoutorg.threeten.bp.Duration  
     
  
  
  withRollbackTimeoutDuration(Duration rollbackTimeout) 
  
    
public   SpannerOptions . SpannerCallContextTimeoutConfigurator   withRollbackTimeoutDuration ( Duration   rollbackTimeout )  
  
    
      
        Parameter  
      
        Name Description  
      
        rollbackTimeoutDuration  
     
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]