ammachado commented on code in PR #28819:
URL: https://github.com/apache/camel/pull/28819#discussion_r4504117678


##########
core/camel-api/src/main/java/org/apache/camel/ExchangeExtension.java:
##########
@@ -382,4 +382,21 @@ default void setSharedUnitOfWork(@Nullable UnitOfWork 
unitOfWork) {
      */
     boolean isExternalRedelivered(Message message);
 
+    /**
+     * The time from the {@code nanoTime} clock when the last node of this 
exchange ended, or 0 if it must not be used.
+     * The statistics of the next node start at this time, which avoids 
reading the clock. This is only for internal use
+     * by Camel.
+     *
+     * @since 4.24
+     */
+    long getLastNodeEndNanos();
+
+    /**
+     * Sets the time when the last node of this exchange ended, or 0 if it 
must not be used. This is only for internal
+     * use by Camel.
+     *
+     * @see   #getLastNodeEndNanos()
+     * @since 4.24
+     */
+    void setLastNodeEndNanos(long nanos);

Review Comment:
   Agreed, thanks. Both are now `default` methods, as `setSharedUnitOfWork` is: 
the getter returns `0` and the setter does nothing. `0` already means "read the 
clock", so an `ExchangeExtension` that does not keep the time gets the timing 
it had before. `ExtendedExchangeExtension` still overrides both. Done in 
b89819e8dc99.
   
   _Claude Code on behalf of Adriano Machado (@ammachado)_
   
   _This was generated by an AI agent and may contain inaccuracies. Please 
verify before relying on it._



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to