47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package com.discord.utilities.persister;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.utilities.time.Clock;
|
|
import com.discord.utilities.time.TimeElapsed;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function3;
|
|
/* compiled from: Persister.kt */
|
|
public final class Persister$Companion$persistAll$1$1 extends o implements Function1<Persister<?>, Unit> {
|
|
public static final Persister$Companion$persistAll$1$1 INSTANCE = new Persister$Companion$persistAll$1$1();
|
|
|
|
public Persister$Companion$persistAll$1$1() {
|
|
super(1);
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public /* bridge */ /* synthetic */ Unit invoke(Persister<?> persister) {
|
|
invoke(persister);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(Persister<?> persister) {
|
|
if (persister != null) {
|
|
Clock access$getClock$cp = Persister.access$getClock$cp();
|
|
if (access$getClock$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("clock");
|
|
}
|
|
TimeElapsed timeElapsed = new TimeElapsed(access$getClock$cp, 0, 2, null);
|
|
Persister.access$persist(persister);
|
|
if (timeElapsed.getMilliseconds() > ((long) 100)) {
|
|
Function3<Integer, String, Exception, Unit> logger = Persister.Companion.getLogger();
|
|
StringBuilder P = a.P("Cached ");
|
|
P.append(persister.getKey());
|
|
P.append(" in ");
|
|
P.append(timeElapsed.getSeconds());
|
|
P.append(" seconds.");
|
|
logger.invoke(4, P.toString(), null);
|
|
}
|
|
}
|
|
}
|
|
}
|