热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 f.java 源代码,内容仅作参考
package h0;
import ch.qos.logback.core.rolling.helper.RollingCalendar;
import java.io.File;
import java.util.Date;
import java.util.Locale;
public abstract class f<E> extends k0.e implements e<E> {
private static String COLLIDING_DATE_FORMAT_URL = "http://logback.qos.ch/codes.html#rfa_collision_in_dateFormat";
public String elapsedPeriodsFileName;
public long nextCheck;
public RollingCalendar f30669rc;
public g<E> tbrp;
public i0.a archiveRemover = null;
public long artificialCurrentTime = -1;
public Date dateInCurrentPeriod = null;
public boolean started = false;
public boolean errorFree = true;
public void computeNextCheck() {
this.nextCheck = this.f30669rc.d(this.dateInCurrentPeriod).getTime();
}
@Override
public i0.a getArchiveRemover() {
return this.archiveRemover;
}
@Override
public String getCurrentPeriodsFileNameWithoutCompressionSuffix() {
return this.tbrp.f30670g.F(this.dateInCurrentPeriod);
}
@Override
public long getCurrentTime() {
long j10 = this.artificialCurrentTime;
return j10 >= 0 ? j10 : System.currentTimeMillis();
}
@Override
public String getElapsedPeriodsFileName() {
return this.elapsedPeriodsFileName;
}
public boolean isErrorFree() {
return this.errorFree;
}
@Override
public boolean isStarted() {
return this.started;
}
public void setCurrentTime(long j10) {
this.artificialCurrentTime = j10;
}
public void setDateInCurrentPeriod(long j10) {
this.dateInCurrentPeriod.setTime(j10);
}
public void setDateInCurrentPeriod(Date date) {
this.dateInCurrentPeriod = date;
}
@Override
public void setTimeBasedRollingPolicy(g<E> gVar) {
this.tbrp = gVar;
}
public void start() {
i0.d<Object> J = this.tbrp.f30664b.J();
if (J == null) {
throw new IllegalStateException("FileNamePattern [" + this.tbrp.f30664b.I() + "] does not contain a valid DateToken");
}
this.f30669rc = J.E() != null ? new RollingCalendar(J.y(), J.E(), Locale.US) : new RollingCalendar(J.y());
addInfo("The date pattern is '" + J.y() + "' from file name pattern '" + this.tbrp.f30664b.I() + "'.");
this.f30669rc.i(this);
if (!this.f30669rc.f()) {
addError("The date format in FileNamePattern will result in collisions in the names of archived log files.");
addError(COLLIDING_DATE_FORMAT_URL);
withErrors();
return;
}
setDateInCurrentPeriod(new Date(getCurrentTime()));
if (this.tbrp.G() != null) {
File file = new File(this.tbrp.G());
if (file.exists() && file.canRead()) {
setDateInCurrentPeriod(new Date(file.lastModified()));
}
}
addInfo("Setting initial period to " + this.dateInCurrentPeriod);
computeNextCheck();
}
@Override
public void stop() {
this.started = false;
}
public void withErrors() {
this.errorFree = false;
}
}