Class TimestampedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.kafka.KafkaException
org.springframework.kafka.listener.TimestampedException
- All Implemented Interfaces:
Serializable
A
KafkaException
that records the timestamp
of when it was thrown.- Since:
- 2.7
- Author:
- Tomaz Fernandes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.kafka.KafkaException
KafkaException.Level
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance with the provided cause and the current time.TimestampedException
(Exception ex, long timestamp) Creates an instance with the timestamp of when it was thrown and its cause.TimestampedException
(Exception ex, Instant now) Creates an instance with the Instant of when it was thrown and its cause. -
Method Summary
Methods inherited from class org.springframework.kafka.KafkaException
selfLog
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TimestampedException
Constructs an instance with the provided cause and the current time.- Parameters:
ex
- the exception cause.
-
TimestampedException
Creates an instance with the timestamp of when it was thrown and its cause.- Parameters:
ex
- the exception cause.timestamp
- the millis from epoch of when the exception was thrown.- Since:
- 2.7.13
-
TimestampedException
Creates an instance with the Instant of when it was thrown and its cause.- Parameters:
ex
- the exception cause.now
- the Instant of when the exception was thrown.- Since:
- 2.7.13
-
-
Method Details
-
getTimestamp
public long getTimestamp()
-