AdGuard v4.4.135版本的 MD5 值为:95950267eaafbda3588f0934f48b2e36
以下内容为反编译后的 SizeBasedTriggeringPolicy.java 源代码,内容仅作参考
package ch.qos.logback.core.rolling;
import ch.qos.logback.core.util.DefaultInvocationGate;
import ch.qos.logback.core.util.FileSize;
import ch.qos.logback.core.util.InvocationGate;
import java.io.File;
public class SizeBasedTriggeringPolicy<E> extends TriggeringPolicyBase<E> {
public static final long DEFAULT_MAX_FILE_SIZE = 10485760;
public static final String SEE_SIZE_FORMAT = "http://logback.qos.ch/codes.html#sbtp_size_format";
FileSize maxFileSize = new FileSize(DEFAULT_MAX_FILE_SIZE);
private InvocationGate invocationGate = new DefaultInvocationGate();
public FileSize getMaxFileSize() {
return this.maxFileSize;
}
@Override
public boolean isTriggeringEvent(File file, E e10) {
if (this.invocationGate.isTooSoon(System.currentTimeMillis())) {
return false;
}
return file.length() >= this.maxFileSize.getSize();
}
public void setMaxFileSize(FileSize fileSize) {
this.maxFileSize = fileSize;
}
}