Interface AsyncTransactionService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.google.common.util.concurrent.ListenableFuture<Long> getAsync​(long startTimestamp)
      Gets the commit timestamp associated with a given startTimestamp in a future, potentially computing it asynchronously.
      com.google.common.util.concurrent.ListenableFuture<Map<Long,​Long>> getAsync​(Iterable<Long> startTimestamps)
      Gets the commit timestamps associated with start timestamps given in startTimestamps, potentially computing them asynchronously.
    • Method Detail

      • getAsync

        com.google.common.util.concurrent.ListenableFuture<Long> getAsync​(long startTimestamp)
        Gets the commit timestamp associated with a given startTimestamp in a future, potentially computing it asynchronously. Non-null future result responses may be cached on the client-side. Null responses must not be cached, as they could subsequently be updated. Future result may return null, which means that the transaction in question had not been committed, at least at some point between the request being made and it returning.
        Parameters:
        startTimestamp - start timestamp of the transaction being looked up
        Returns:
        ListenableFuture containing the timestamp which the transaction committed at, or null if the transaction had not committed yet
      • getAsync

        com.google.common.util.concurrent.ListenableFuture<Map<Long,​Long>> getAsync​(Iterable<Long> startTimestamps)
        Gets the commit timestamps associated with start timestamps given in startTimestamps, potentially computing them asynchronously. Returned entries may be cached on the client-side. Entries which are missing which are equivalent to null responses in getAsync(long) must not be cached, as they could subsequently be updated. Future result is never null. However, missing key-value pairs mean that transactions in question have not been committed, at least at some point between the request being made and it returning.
        Parameters:
        startTimestamps - start timestamps of the transactions being looked up
        Returns:
        ListenableFuture containing the map from a transaction start timestamp to transaction commit timestamp, possibly missing entries if relevant transactions have not committed yet