mirror of https://github.com/apache/lucene.git
LUCENE-3622: push this to the impl, its in the perdocwritestate if an impl chooses to buffer
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3622@1211301 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd47d1464e
commit
fe6d400765
|
@ -23,7 +23,6 @@ import org.apache.lucene.index.MergeState;
|
|||
import org.apache.lucene.index.values.IndexDocValues;
|
||||
import org.apache.lucene.index.values.PerDocFieldValues;
|
||||
import org.apache.lucene.util.Bits;
|
||||
import org.apache.lucene.util.Counter;
|
||||
|
||||
/**
|
||||
* Abstract API that consumes {@link PerDocFieldValues}.
|
||||
|
@ -36,20 +35,6 @@ import org.apache.lucene.util.Counter;
|
|||
*/
|
||||
public abstract class DocValuesConsumer {
|
||||
|
||||
protected final Counter bytesUsed;
|
||||
|
||||
/**
|
||||
* Creates a new {@link DocValuesConsumer}.
|
||||
*
|
||||
* @param bytesUsed
|
||||
* bytes-usage tracking reference used by implementation to track
|
||||
* internally allocated memory. All tracked bytes must be released
|
||||
* once {@link #finish(int)} has been called.
|
||||
*/
|
||||
protected DocValuesConsumer(Counter bytesUsed) {
|
||||
this.bytesUsed = bytesUsed == null ? Counter.newCounter() : bytesUsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given {@link PerDocFieldValues} instance to this
|
||||
* {@link DocValuesConsumer}
|
||||
|
|
|
@ -42,6 +42,8 @@ import org.apache.lucene.util.Counter;
|
|||
*/
|
||||
public abstract class Writer extends DocValuesConsumer {
|
||||
protected Source currentMergeSource;
|
||||
protected final Counter bytesUsed;
|
||||
|
||||
/**
|
||||
* Creates a new {@link Writer}.
|
||||
*
|
||||
|
@ -51,7 +53,7 @@ public abstract class Writer extends DocValuesConsumer {
|
|||
* once {@link #finish(int)} has been called.
|
||||
*/
|
||||
protected Writer(Counter bytesUsed) {
|
||||
super(bytesUsed);
|
||||
this.bytesUsed = bytesUsed;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue