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,
java.lang.String desc,
long expectedCount)
Create a new writer with an unknown number of incoming points
|
Modifier and Type | Method and Description |
---|---|
void |
append(byte[] packedValue,
int docID)
Add a new point from the packed value and docId
|
void |
append(PointValue pointValue)
Add a new point from a
PointValue |
void |
close() |
long |
count()
Return the number of points in this writer
|
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 |
protected OfflinePointReader |
getReader(long start,
long length,
byte[] reusableBuffer) |
java.lang.String |
toString() |
public final IndexOutput out
public final java.lang.String name
public OfflinePointWriter(Directory tempDir, java.lang.String tempFileNamePrefix, int packedBytesLength, java.lang.String desc, long expectedCount) throws java.io.IOException
java.io.IOException
public void append(byte[] packedValue, int docID) throws java.io.IOException
PointWriter
append
in interface PointWriter
java.io.IOException
public void append(PointValue pointValue) throws java.io.IOException
PointWriter
PointValue
append
in interface PointWriter
java.io.IOException
public PointReader getReader(long start, long length) throws java.io.IOException
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
java.io.IOException
protected OfflinePointReader getReader(long start, long length, byte[] reusableBuffer) throws java.io.IOException
java.io.IOException
public long count()
PointWriter
count
in interface PointWriter
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public void destroy() throws java.io.IOException
PointWriter
destroy
in interface PointWriter
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.