Send feedback
  
   
 
  
    
      Class CloudExecutor.OutcomeSender (6.101.1)
    
    
       
    
    
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
      
     
  
  
   
  
    
  
  
    
    
    
  Version 6.101.1keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   class  CloudExecutor . OutcomeSender  
   
  OutcomeSender is a utility class used for sending action outcomes back to the client. For read
 actions, it buffers rows and sends partial read results in batches.
 
  
  
  Constructors
   
   
  OutcomeSender(int actionId, CloudClientExecutor.ExecutionFlowContext context) 
  
    
public   OutcomeSender ( int   actionId ,   CloudClientExecutor . ExecutionFlowContext   context )  
   
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        actionId 
        int  
       
      
        context 
        com.google.cloud.executor.spanner.CloudClientExecutor.ExecutionFlowContext  
       
     
  
  Methods
   
   
  appendChangeStreamRecord(ChangeStreamRecord record) 
  
    
public   Status   appendChangeStreamRecord ( ChangeStreamRecord   record )  
   
  Append change stream record to result.
 
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  appendRow(ValueList row) 
  
    
public   Status   appendRow ( ValueList   row )  
   
  Add another row to buffer. If buffer hits its size limit, buffered rows will be sent back.
 
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  appendRowsModifiedInDml(Long rowsModified) 
  
    
public   void   appendRowsModifiedInDml ( Long   rowsModified )  
   
  Add rows modified in DML to result.
 
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        rowsModified 
        Long  
       
     
  
   
  finishWithError(Status err) 
  
    
public   Status   finishWithError ( Status   err )  
   
  Send the last outcome with given error status.
 
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        err 
        io.grpc.Status  
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  finishWithOK() 
  
    
public   Status   finishWithOK ()  
   
  Send the last outcome with OK status.
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  finishWithTransactionRestarted() 
  
    
public   Status   finishWithTransactionRestarted ()  
   
  Send the last outcome with aborted error, this will set the transactionRestarted to true.
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  getChangeStreamHeartbeatMilliSeconds() 
  
    
public   long   getChangeStreamHeartbeatMilliSeconds ()  
   
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        long  
         
       
     
  
   
  getChangeStreamRecordReceivedTimestamp() 
  
    
public   long   getChangeStreamRecordReceivedTimestamp ()  
   
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        long  
         
       
     
  
   
  getIsPartitionedChangeStreamQuery() 
  
    
public   boolean   getIsPartitionedChangeStreamQuery ()  
   
  
   
  initForBatchRead(String table, String index) 
  
    
public   void   initForBatchRead ( String   table ,   String   index )  
   
  Init the sender for batch read action, then set the table and index if there exists.
 
  
   
  initForChangeStreamQuery(long changeStreamHeartbeatMilliseconds, String changeStreamName, String partitionToken) 
  
    
public   void   initForChangeStreamQuery ( long   changeStreamHeartbeatMilliseconds ,   String   changeStreamName ,   String   partitionToken )  
   
  Init the sender for change stream query action.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        changeStreamHeartbeatMilliseconds 
        long  
       
      
        changeStreamName 
        String  
       
      
        partitionToken 
        String  
       
     
  
   
  initForQuery() 
  
    
public   void   initForQuery ()  
   
  Init the sender for query action.
 
   
  initForRead(String table, String index) 
  
    
public   void   initForRead ( String   table ,   String   index )  
   
  Init the sender for read action, then set the table and index if there exists.
 
  
   
  sendOutcome(SpannerActionOutcome outcome) 
  
    
public   Status   sendOutcome ( SpannerActionOutcome   outcome )  
   
  Send the given SpannerActionOutcome.
 
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        io.grpc.Status  
         
       
     
  
   
  setRowType(StructType rowType) 
  
    
public   void   setRowType ( StructType   rowType )  
   
  Set the rowType for appending row.
 
  
   
  setTimestamp(Timestamp timestamp) 
  
    
public   void   setTimestamp ( Timestamp   timestamp )  
   
  Set the timestamp for commit.
 
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        timestamp 
        Timestamp  
       
     
  
   
  updateChangeStreamRecordReceivedTimestamp(long changeStreamRecordReceivedTimestamp) 
  
    
public   void   updateChangeStreamRecordReceivedTimestamp ( long   changeStreamRecordReceivedTimestamp )  
   
  Update change stream record timestamp.
 
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        changeStreamRecordReceivedTimestamp 
        long  
       
     
  
 
     
    
  
  
  
     
  
 
  
    
    
      
    
     
  
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  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-30 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]