You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/structuredmessage/StructuredMessageDecoder.java
+31-9Lines changed: 31 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,23 @@ public long getMessageOffset() {
68
68
returnmessageOffset;
69
69
}
70
70
71
+
/**
72
+
* Advances the message offset by the specified number of bytes.
73
+
* This should be called after consuming an encoded segment to maintain
74
+
* the authoritative encoded offset.
75
+
*
76
+
* @param bytes The number of bytes to advance.
77
+
*/
78
+
publicvoidadvanceMessageOffset(longbytes) {
79
+
longpriorOffset = messageOffset;
80
+
messageOffset += bytes;
81
+
LOGGER.atInfo()
82
+
.addKeyValue("priorOffset", priorOffset)
83
+
.addKeyValue("bytesAdvanced", bytes)
84
+
.addKeyValue("newOffset", messageOffset)
85
+
.log("Advanced message offset");
86
+
}
87
+
71
88
/**
72
89
* Resets the decoder position to the last complete segment boundary.
73
90
* This is used during smart retry to ensure the decoder is in sync with
Copy file name to clipboardExpand all lines: sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageContentValidationDecoderPolicy.java
0 commit comments