org.babyfish.jimmer.sql.cache.spi.AbstractTrackingProducerBinder 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
The newest version!
package org.babyfish.jimmer.sql.cache.spi;
import org.babyfish.jimmer.meta.ImmutableProp;
import org.babyfish.jimmer.meta.ImmutableType;
import org.babyfish.jimmer.sql.cache.CacheTracker;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
public abstract class AbstractTrackingProducerBinder extends AbstractBinder {
private final CacheTracker tracker;
public AbstractTrackingProducerBinder(
@Nullable ImmutableType type,
@Nullable ImmutableProp prop,
@Nullable CacheTracker tracker
) {
super(type, prop);
this.tracker = tracker;
}
@Override
public final void deleteAllImpl(Collection keys) {
deleteAllKeys(keys);
if (tracker == null) {
return;
}
Set> ids = keys instanceof Set> ?
(Set>) keys :
new LinkedHashSet