io.polyglotted.pgmodel.search.query.StandardScroll Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pg-model Show documentation
Show all versions of pg-model Show documentation
Standard set of models for geo coding, access control and elastic search abstraction
package io.polyglotted.pgmodel.search.query;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import java.util.Objects;
import static io.polyglotted.pgmodel.util.ModelUtil.jsonEquals;
import static java.util.concurrent.TimeUnit.MINUTES;
@RequiredArgsConstructor
@ToString(includeFieldNames = false, doNotUseGetters = true)
public final class StandardScroll {
public final String scrollId;
public final long scrollTimeInMillis;
@Override
public boolean equals(Object o) {
return jsonEquals(this, o);
}
@Override
public int hashCode() {
return Objects.hash(scrollId, scrollTimeInMillis);
}
public static StandardScroll fromScrollId(String scrollId) {
return new StandardScroll(scrollId, MINUTES.toMillis(5));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy