code: private void generateTableAttributeUpdates(long currentOffset, long newOffset, int processedCount, UpdateInstructions update) {
          // Add an Update for the INDEX_OFFSET to indicate we have indexed everything up to this offset.
          Preconditions.checkArgument(currentOffset <= newOffset, "newOffset must be larger than existingOffset");
          update.withAttribute(new AttributeUpdate(TableAttributes.INDEX_OFFSET, AttributeUpdateType.ReplaceIfEquals, newOffset, currentOffset));
  
          // Update Bucket and Entry counts.
          if (update.getEntryCountDelta() != 0) {
              update.withAttribute(new AttributeUpdate(TableAttributes.ENTRY_COUNT, AttributeUpdateType.Accumulate, update.getEntryCountDelta()));
          }
  
          if (update.getBucketCountDelta() != 0) {
              update.withAttribute(new AttributeUpdate(TableAttributes.BUCKET_COUNT, AttributeUpdateType.Accumulate, update.getBucketCountDelta()));
          }
  
          if (processedCount > 0) {
              update.withAttribute(new AttributeUpdate(TableAttributes.TOTAL_ENTRY_COUNT, AttributeUpdateType.Accumulate, processedCount));
          }
      }
docs: Generates conditional {@link AttributeUpdate}s that update the values for Core Attributes representing the indexing
  state of the Table Segment.
  
  @param currentOffset  The offset from which this indexing batch began. This will be checked against
  {@link TableAttributes#INDEX_OFFSET}.
  @param newOffset      The new offset to set for {@link TableAttributes#INDEX_OFFSET}.
  @param processedCount The total number of Table Entry updates processed (including overwritten ones).
  @param update         A {@link UpdateInstructions} object to collect updates into.