Constructor and Description |
---|
SMUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
calculateDelta(long reportedHandledCount,
long lastKnownHandledCount)
Calculates the delta of the last known stanza handled count and the new
reported stanza handled count while considering that the new value may be
wrapped after 2^32-1.
|
static long |
incrementHeight(long height)
Quoting XEP-198 4.:
"In the unlikely case that the number of stanzas handled during a stream management session exceeds the number
of digits that can be represented by the unsignedInt datatype as specified in XML Schema Part 2 [10]
(i.e., 2^32), the value of 'h' SHALL be reset from 2^32-1 back to zero (rather than being incremented to 2^32)."
|
public SMUtils()
public static long incrementHeight(long height)
height
- public static long calculateDelta(long reportedHandledCount, long lastKnownHandledCount)
reportedHandledCount
- lastKnownHandledCount
-