org.infinispan.quarkus.hibernate.cache.Time Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-local-cache Show documentation
Show all versions of quarkus-local-cache Show documentation
Local-only Hibernate Cache optimized for Quarkus
package org.infinispan.quarkus.hibernate.cache;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
final class Time {
private static final Duration FOREVER = ChronoUnit.FOREVER.getDuration();
private Time() {
}
static Duration forever() {
return FOREVER;
}
static boolean isForever(Duration duration) {
return FOREVER.equals(duration);
}
@FunctionalInterface
public interface NanosService {
long nanoTime();
}
@FunctionalInterface
public interface MillisService {
MillisService SYSTEM = System::currentTimeMillis;
long milliTime();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy