Rename AcquirableCollection acquire methods name

This commit is contained in:
TheMode 2021-04-26 13:23:32 +02:00
parent c3f1b9159c
commit 9ca09a32bf

View File

@ -16,7 +16,7 @@ public class AcquirableCollection<E> implements Collection<Acquirable<E>> {
this.acquirableCollection = acquirableCollection;
}
public void forEachSync(@NotNull Consumer<E> consumer) {
public void acquireSync(@NotNull Consumer<E> consumer) {
final Thread currentThread = Thread.currentThread();
var threadEntitiesMap = retrieveOptionalThreadMap(acquirableCollection, currentThread, consumer);
@ -35,8 +35,8 @@ public class AcquirableCollection<E> implements Collection<Acquirable<E>> {
}
}
public void forEachAsync(@NotNull Consumer<E> consumer) {
AsyncUtils.runAsync(() -> forEachSync(consumer));
public void acquireAsync(@NotNull Consumer<E> consumer) {
AsyncUtils.runAsync(() -> acquireSync(consumer));
}
public @NotNull Stream<E> unwrap() {