HasInteractionIdAndSequence

Extends HasInteractionId to add a strictly monotonically increasing sequence number.

There are two different use cases for this:

  • The first is to identify different transactions within the overall org.apache.causeway.applib.services.iactn.Interaction .

    In the vast majority of cases there will only be a single transaction per org.apache.causeway.applib.services.iactn.Interaction , but this isn’t always the case as domain objects may on occasion need to explicitly manage transaction boundaries using org.apache.causeway.applib.services.xactn.TransactionService .

  • The second is to identify different executions within the overall org.apache.causeway.applib.services.iactn.Interaction .

    In the vast majority of cases there will only be a single execution per org.apache.causeway.applib.services.iactn.Interaction , but this isn’t always the case; sometimes a top-level execution will cause another execution to occur, using the org.apache.causeway.applib.services.wrapper.WrapperFactory .

These two different sequences are independent of each other.

API

HasInteractionIdAndSequence.java
interface HasInteractionIdAndSequence {
  int getSequence()     (1)
}
1 getSequence()

Holds the sequence number uniquely an "event" within the overall org.apache.causeway.applib.services.iactn.Interaction .

Members

getSequence()

Holds the sequence number uniquely an "event" within the overall org.apache.causeway.applib.services.iactn.Interaction .

The "event" could be a member execution (an action invocation or property edit), or could be a transaction.