Interface Temporal
-
public interface Temporal
Describes a domain class that can inform the caller of the last time it was updated.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Instant
getTimestamp()
Temporal state describing the time at which this item was last updated.void
setTimestamp(Instant timestamp)
Temporal state describing the time at which this item was last updated.
-
-
-
Method Detail
-
getTimestamp
Instant getTimestamp()
Temporal state describing the time at which this item was last updated. Relates to theTemporal
interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.- Returns:
- Temporal state describing the time at which this item was last updated
-
setTimestamp
void setTimestamp(Instant timestamp)
Temporal state describing the time at which this item was last updated. Relates to theTemporal
interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.- Parameters:
timestamp
- Temporal state describing the time at which this item was last updated
-
-