2020-07-15 18:02:38 +05:30

29 lines
551 B
Java

package events;
import models.Record;
public class Eviction<K, V> extends Event<K, V> {
private final Type type;
public Eviction(Record<K, V> element, Type type, long timestamp) {
super(element, timestamp);
this.type = type;
}
public Type getType() {
return type;
}
public enum Type {
EXPIRY, REPLACEMENT
}
@Override
public String toString() {
return "Eviction{" +
"type=" + type +
", "+super.toString() +
"}\n";
}
}