Skip to content

Commit 6d81859

Browse files
committed
Reverting the taskqueue migration preview changes.
PiperOrigin-RevId: 965747426 Change-Id: Ifb987467ca810ef544076094ccdb9e1dce1ab5b7
1 parent f57d46b commit 6d81859

19 files changed

Lines changed: 63 additions & 2770 deletions

File tree

api/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@
122122
<groupId>javax.servlet</groupId>
123123
<artifactId>javax.servlet-api</artifactId>
124124
</dependency>
125-
<dependency>
126-
<groupId>com.google.cloud</groupId>
127-
<artifactId>google-cloud-tasks</artifactId>
128-
</dependency>
129125
<dependency>
130126
<groupId>org.antlr</groupId>
131127
<artifactId>antlr-runtime</artifactId>

api/src/main/java/com/google/appengine/api/datastore/DatastoreApiHelper.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ public final class DatastoreApiHelper {
5656

5757
private DatastoreApiHelper() {}
5858

59-
/**
60-
* Registers a callback to be executed immediately after the specified transaction commits.
61-
* If the transaction is rolled back or fails to commit, the callback will not be invoked.
62-
*/
63-
public static void addPostCommitCallback(Transaction txn, Runnable callback) {
64-
if (txn instanceof TransactionImpl txnImpl && callback != null) {
65-
txnImpl.addPostCommitCallback(callback);
66-
}
67-
}
68-
6959
// Corresponds to _ToDatastoreError in datastore.py.
7060
// Keep in sync!
7161
public static RuntimeException translateError(ApiProxy.ApplicationException exception) {

api/src/main/java/com/google/appengine/api/datastore/TransactionImpl.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@ enum TransactionState {
8181

8282
TransactionState state = TransactionState.BEGUN;
8383

84-
private final List<Runnable> postCommitCallbacks = new java.util.concurrent.CopyOnWriteArrayList<>();
85-
86-
void addPostCommitCallback(Runnable callback) {
87-
if (callback != null) {
88-
postCommitCallbacks.add(callback);
89-
}
90-
}
91-
9284
/** A {@link PostOpFuture} implementation that runs both post put and post delete callbacks. */
9385
private class PostCommitFuture extends PostOpFuture<Void> {
9486
private final List<Entity> putEntities;
@@ -108,13 +100,6 @@ void executeCallbacks(Void ignoreMe) {
108100
DeleteContext deleteContext =
109101
new DeleteContext(TransactionImpl.this, TransactionImpl.this, deletedKeys);
110102
callbacks.executePostDeleteCallbacks(deleteContext);
111-
for (Runnable callback : postCommitCallbacks) {
112-
try {
113-
callback.run();
114-
} catch (Throwable t) {
115-
logger.log(Level.SEVERE, "Exception in post-commit callback: " + t.getMessage(), t);
116-
}
117-
}
118103
}
119104
}
120105

0 commit comments

Comments
 (0)