BTGO游戏盒 v3.4.80版本的 MD5 值为:000032bab1addaabfdc671ee6a7087ab
以下内容为反编译后的 h.java 源代码,内容仅作参考
package j0;
import java.io.File;
import java.util.Date;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import k0.t;
import p0.m;
public class h<E> extends d implements i<E> {
public k0.i f22823g;
public k0.c f22824h;
public Future<?> f22826j;
public Future<?> f22827k;
public k0.a f22830n;
public f<E> f22831o;
public t f22825i = new t();
public int f22828l = 0;
public m f22829m = new m(0);
public boolean f22832p = false;
public boolean J() {
return this.f22829m.a() == 0;
}
public Future<?> K(String str, String str2) throws e {
String G = G();
String str3 = str + System.nanoTime() + ".tmp";
this.f22825i.G(G, str3);
return this.f22824h.F(str3, str, str2);
}
public void L(f<E> fVar) {
this.f22831o = fVar;
}
public final String M(String str) {
return k0.g.a(k0.g.b(str));
}
public final void N(Future<?> future, String str) {
StringBuilder sb;
String str2;
if (future != null) {
try {
future.get(30L, TimeUnit.SECONDS);
} catch (TimeoutException e10) {
e = e10;
sb = new StringBuilder();
str2 = "Timeout while waiting for ";
sb.append(str2);
sb.append(str);
sb.append(" job to finish");
addError(sb.toString(), e);
} catch (Exception e11) {
e = e11;
sb = new StringBuilder();
str2 = "Unexpected exception while waiting for ";
sb.append(str2);
sb.append(str);
sb.append(" job to finish");
addError(sb.toString(), e);
}
}
}
@Override
public String e() {
String G = G();
return G != null ? G : this.f22831o.getCurrentPeriodsFileNameWithoutCompressionSuffix();
}
@Override
public boolean isTriggeringEvent(File file, E e10) {
return this.f22831o.isTriggeringEvent(file, e10);
}
@Override
public void k() throws e {
String elapsedPeriodsFileName = this.f22831o.getElapsedPeriodsFileName();
String a10 = k0.g.a(elapsedPeriodsFileName);
if (this.f22817a != k0.b.NONE) {
this.f22826j = G() == null ? this.f22824h.F(elapsedPeriodsFileName, elapsedPeriodsFileName, a10) : K(elapsedPeriodsFileName, a10);
} else if (G() != null) {
this.f22825i.G(G(), elapsedPeriodsFileName);
}
if (this.f22830n != null) {
this.f22827k = this.f22830n.h(new Date(this.f22831o.getCurrentTime()));
}
}
@Override
public void start() {
this.f22825i.setContext(this.context);
if (this.f22819c == null) {
addWarn("The FileNamePattern option must be set before using TimeBasedRollingPolicy. ");
addWarn("See also http://logback.qos.ch/codes.html#tbr_fnp_not_set");
throw new IllegalStateException("The FileNamePattern option must be set before using TimeBasedRollingPolicy. See also http://logback.qos.ch/codes.html#tbr_fnp_not_set");
}
this.f22818b = new k0.i(this.f22819c, this.context);
F();
k0.c cVar = new k0.c(this.f22817a);
this.f22824h = cVar;
cVar.setContext(this.context);
this.f22823g = new k0.i(k0.c.H(this.f22819c, this.f22817a), this.context);
addInfo("Will use the pattern " + this.f22823g + " for the active file");
if (this.f22817a == k0.b.ZIP) {
this.f22821e = new k0.i(M(this.f22819c), this.context);
}
if (this.f22831o == null) {
this.f22831o = new a();
}
this.f22831o.setContext(this.context);
this.f22831o.setTimeBasedRollingPolicy(this);
this.f22831o.start();
if (!this.f22831o.isStarted()) {
addWarn("Subcomponent did not start. TimeBasedRollingPolicy will not start.");
return;
}
if (this.f22828l != 0) {
k0.a archiveRemover = this.f22831o.getArchiveRemover();
this.f22830n = archiveRemover;
archiveRemover.t(this.f22828l);
this.f22830n.s(this.f22829m.a());
if (this.f22832p) {
addInfo("Cleaning on start up");
this.f22827k = this.f22830n.h(new Date(this.f22831o.getCurrentTime()));
}
} else if (!J()) {
addWarn("'maxHistory' is not set, ignoring 'totalSizeCap' option with value [" + this.f22829m + "]");
}
super.start();
}
@Override
public void stop() {
if (isStarted()) {
N(this.f22826j, "compression");
N(this.f22827k, "clean-up");
super.stop();
}
}
public void t(int i10) {
this.f22828l = i10;
}
public String toString() {
return "c.q.l.core.rolling.TimeBasedRollingPolicy@" + hashCode();
}
}