Skip to content

Commit 2a3a543

Browse files
committed
Release 2.0.5-SNAPSHOT
- Adds DataManager#flushTaskQueue
1 parent 10585a3 commit 2a3a543

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = 'net.staticstudios'
8-
version = '2.0.4'
8+
version = '2.0.5-SNAPSHOT'
99

1010
repositories {
1111
mavenCentral()

src/main/java/net/staticstudios/data/DataManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,17 @@ public String getIdColumn(Class<? extends UniqueData> clazz) {
11091109
return dummyInstances.get(clazz).getIdentifier().getColumn();
11101110
}
11111111

1112+
/**
1113+
* Block the calling thread until all previously enqueued tasks have been completed
1114+
*/
1115+
@Blocking
1116+
public void flushTaskQueue() {
1117+
//This will add a task to the queue and block until it's done
1118+
submitBlockingTask(connection -> {
1119+
//Ignore
1120+
});
1121+
}
1122+
11121123
private record InitialPersistentDataWrapper(InitialPersistentValue data, boolean updateCache, Object oldValue) {
11131124
}
11141125
}

0 commit comments

Comments
 (0)