All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.babyfish.jimmer.sql.cache.CacheLocker Maven / Gradle / Ivy

There is a newer version: 0.9.19
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy