![JAR search and dependency download from the Maven repository](/logo.png)
org.wildfly.clustering.ejb.cache.timer.MutableTimerMetaDataEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wildfly-clustering-ejb-cache Show documentation
Show all versions of wildfly-clustering-ejb-cache Show documentation
Contains code common to the wildfly-clustering-ejb-hotrod and wildfly-clustering-ejb-infinispan modules.
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.clustering.ejb.cache.timer;
import java.lang.reflect.Method;
import java.time.Duration;
import java.time.Instant;
import java.util.function.Predicate;
import org.wildfly.clustering.server.offset.OffsetValue;
import org.wildfly.clustering.ejb.timer.TimerType;
/**
* @author Paul Ferraro
* @param the timer context type
*/
public class MutableTimerMetaDataEntry implements TimerMetaDataEntry {
private final ImmutableTimerMetaDataEntry entry;
private final OffsetValue lastTimeout;
public MutableTimerMetaDataEntry(ImmutableTimerMetaDataEntry entry, OffsetValue lastTimeout) {
this.entry = entry;
this.lastTimeout = lastTimeout;
}
@Override
public TimerType getType() {
return this.entry.getType();
}
@Override
public C getContext() {
return this.entry.getContext();
}
@Override
public Instant getStart() {
return this.entry.getStart();
}
@Override
public Predicate getTimeoutMatcher() {
return this.entry.getTimeoutMatcher();
}
@Override
public Duration getLastTimeout() {
return this.lastTimeout.get();
}
@Override
public void setLastTimeout(Duration timeout) {
this.lastTimeout.set(timeout);
}
@Override
public Instant apply(Instant instant) {
return this.entry.apply(instant);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy