
org.elder.sourcerer.EventSubscriptionUpdate Maven / Gradle / Ivy
package org.elder.sourcerer;
public class EventSubscriptionUpdate {
public enum UpdateType {
EVENT,
CAUGHT_UP,
}
private UpdateType updateType;
private EventRecord event;
public EventSubscriptionUpdate(final UpdateType updateType, final EventRecord event) {
this.updateType = updateType;
this.event = event;
}
public UpdateType getUpdateType() {
return updateType;
}
public EventRecord getEvent() {
return event;
}
public static EventSubscriptionUpdate caughtUp() {
return new EventSubscriptionUpdate<>(UpdateType.CAUGHT_UP, null);
}
public static EventSubscriptionUpdate ofEvent(final EventRecord event) {
return new EventSubscriptionUpdate<>(UpdateType.EVENT, event);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy