org.babyfish.jimmer.sql.cache.CacheLocker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.sql.cache;
import org.babyfish.jimmer.sql.cache.chain.LockableBinder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.time.Duration;
import java.util.Set;
import java.util.SortedMap;
public interface CacheLocker {
void locking(
@NotNull LockableBinder, ?> binder,
@NotNull Set> missedKeys,
@Nullable Duration waitingDuration,
@NotNull Duration lockingDuration,
Action action
) throws Exception;
@FunctionalInterface
interface Action {
void execute(boolean locked);
}
}