Interface AsyncTransactionService
-
- All Known Subinterfaces:
TransactionService
public interface AsyncTransactionService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.google.common.util.concurrent.ListenableFuture<Long>
getAsync(long startTimestamp)
Deprecated.usegetAsyncV2(long)
com.google.common.util.concurrent.ListenableFuture<Map<Long,Long>>
getAsync(Iterable<Long> startTimestamps)
Deprecated.com.google.common.util.concurrent.ListenableFuture<TransactionStatus>
getAsyncV2(long startTimestamp)
Gets the transaction status associated with a givenstartTimestamp
in a future, potentially computing it asynchronously.com.google.common.util.concurrent.ListenableFuture<Map<Long,TransactionStatus>>
getAsyncV2(Iterable<Long> startTimestamps)
Gets the transaction statuses associated with the givenstartTimestamps
in a future, potentially computing it asynchronously.
-
-
-
Method Detail
-
getAsync
@Deprecated com.google.common.util.concurrent.ListenableFuture<Long> getAsync(long startTimestamp)
Deprecated.usegetAsyncV2(long)
Gets the commit timestamp associated with a givenstartTimestamp
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
@Deprecated com.google.common.util.concurrent.ListenableFuture<Map<Long,Long>> getAsync(Iterable<Long> startTimestamps)
Deprecated.Gets the commit timestamps associated with start timestamps given instartTimestamps
, potentially computing them asynchronously. Returned entries may be cached on the client-side. Entries which are missing which are equivalent to null responses ingetAsync(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.
-
getAsyncV2
com.google.common.util.concurrent.ListenableFuture<TransactionStatus> getAsyncV2(long startTimestamp)
Gets the transaction status associated with a givenstartTimestamp
in a future, potentially computing it asynchronously. Known future result responses may be cached on the client-side.- Parameters:
startTimestamp
- start timestamp of the transaction being looked up- Returns:
ListenableFuture
containing theTransactionStatus
.
-
getAsyncV2
com.google.common.util.concurrent.ListenableFuture<Map<Long,TransactionStatus>> getAsyncV2(Iterable<Long> startTimestamps)
Gets the transaction statuses associated with the givenstartTimestamps
in a future, potentially computing it asynchronously. Known future result responses may be cached on the client-side.- Parameters:
startTimestamps
- start timestamps of the transaction being looked up- Returns:
ListenableFuture
containing the map from a transaction start timestamp toTransactionStatus
All start timestamps are expected to be present in the returning map.
-
-