Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
pgomulka committed May 17, 2024
1 parent 1687fa0 commit df46e7c
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

package org.elasticsearch.plugins.internal;

import org.apache.lucene.index.SegmentInfos;

import java.util.Map;

/**
Expand All @@ -20,8 +22,8 @@ public interface DocumentSizeAccumulator {
public void add(long size) {}

@Override
public Map<String, String> getAndReset(Map<String, String> map) {
return map;
public Map<String, String> getAsCommitUserData(SegmentInfos segmentInfos) {
return Map.of();
}
};

Expand All @@ -32,10 +34,11 @@ public Map<String, String> getAndReset(Map<String, String> map) {
void add(long size);

/**
* Adds an entry to a map with a value being the current state of the accumulator.
* Returns a map with an entry being the current state of the accumulator + previously commited value for that key
* Then resets the accumulator.
* @param map a map with previous value of size
*
* @param segmentInfos a shard's previously comited SegmentInfos
* @return an map with a new value of size
*/
Map<String, String> getAndReset(Map<String, String> map);
Map<String, String> getAsCommitUserData(SegmentInfos segmentInfos);
}

0 comments on commit df46e7c

Please sign in to comment.