public final class OfflinePointWriter extends java.lang.Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name |
IndexOutput |
out |
| Constructor and Description |
|---|
OfflinePointWriter(Directory tempDir,
java.lang.String tempFileNamePrefix,
int packedBytesLength,
boolean longOrds,
java.lang.String desc,
long expectedCount,
boolean singleValuePerDoc)
Create a new writer with an unknown number of incoming points
|
OfflinePointWriter(Directory tempDir,
java.lang.String name,
int packedBytesLength,
long count,
boolean longOrds,
boolean singleValuePerDoc)
Initializes on an already written/closed file, just so consumers can use
getReader(long, long) to read the file. |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] packedValue,
long ord,
int docID)
Add a new point
|
void |
close() |
void |
destroy()
Removes any temp files behind this writer
|
PointReader |
getReader(long start,
long length)
Returns a
PointReader iterator to step through all previously added points |
PointReader |
getSharedReader(long start,
long length,
java.util.List<java.io.Closeable> toCloseHeroically)
Returns the single shared reader, used at multiple times during the recursion, to read previously added points
|
java.lang.String |
toString() |
public final IndexOutput out
public final java.lang.String name
public OfflinePointWriter(Directory tempDir, java.lang.String tempFileNamePrefix, int packedBytesLength, boolean longOrds, java.lang.String desc, long expectedCount, boolean singleValuePerDoc) throws java.io.IOException
java.io.IOExceptionpublic OfflinePointWriter(Directory tempDir, java.lang.String name, int packedBytesLength, long count, boolean longOrds, boolean singleValuePerDoc)
getReader(long, long) to read the file.public void append(byte[] packedValue,
long ord,
int docID)
throws java.io.IOException
PointWriterappend in interface PointWriterjava.io.IOExceptionpublic PointReader getReader(long start, long length) throws java.io.IOException
PointWriterPointReader iterator to step through all previously added pointsgetReader in interface PointWriterjava.io.IOExceptionpublic PointReader getSharedReader(long start, long length, java.util.List<java.io.Closeable> toCloseHeroically) throws java.io.IOException
PointWritergetSharedReader in interface PointWriterjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void destroy()
throws java.io.IOException
PointWriterdestroy in interface PointWriterjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.