io.split.engine.common.FetchOptions Maven / Gradle / Ivy
package io.split.engine.common;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
public class FetchOptions {
public static final Long DEFAULT_TARGET_CHANGENUMBER = -1L;
public static class Builder {
public Builder() {}
public Builder(FetchOptions opts) {
_targetCN = opts._targetCN;
_cacheControlHeaders = opts._cacheControlHeaders;
_fastlyDebugHeader = opts._fastlyDebugHeader;
_responseHeadersCallback = opts._responseHeadersCallback;
}
public Builder cacheControlHeaders(boolean on) {
_cacheControlHeaders = on;
return this;
}
public Builder fastlyDebugHeader(boolean on) {
_fastlyDebugHeader = on;
return this;
}
public Builder responseHeadersCallback(Function