Class PartitionMetadataDao.TransactionResult<T>

  • Type Parameters:
    T - the return type of the transaction execution
    Enclosing class:
    PartitionMetadataDao

    public static class PartitionMetadataDao.TransactionResult<T>
    extends java.lang.Object
    Represents a result from executing a Cloud Spanner read / write transaction. It encapsulates the return from the transaction function and a commit timestamp.
    • Constructor Summary

      Constructors 
      Constructor Description
      TransactionResult​(T result, com.google.cloud.Timestamp commitTimestamp)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.cloud.Timestamp getCommitTimestamp()
      Returns the commit timestamp of the read / write transaction.
      T getResult()
      Returns the result of the transaction execution.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TransactionResult

        public TransactionResult​(@Nullable
                                 T result,
                                 com.google.cloud.Timestamp commitTimestamp)
    • Method Detail

      • getResult

        @Nullable
        public T getResult()
        Returns the result of the transaction execution.
      • getCommitTimestamp

        public com.google.cloud.Timestamp getCommitTimestamp()
        Returns the commit timestamp of the read / write transaction.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object