org.apache.lucene.util
Class ThrottledIndexOutput
java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.store.IndexOutput
org.apache.lucene.util.ThrottledIndexOutput
- All Implemented Interfaces:
- Closeable
public class ThrottledIndexOutput
- extends IndexOutput
Intentionally slow IndexOutput for testing.
Constructor Summary |
ThrottledIndexOutput(int bytesPerSecond,
long delayInMillis,
IndexOutput delegate)
|
ThrottledIndexOutput(int bytesPerSecond,
long delays,
int minBytesWritten,
IndexOutput delegate)
|
ThrottledIndexOutput(int bytesPerSecond,
long flushDelayMillis,
long closeDelayMillis,
long seekDelayMillis,
long minBytesWritten,
IndexOutput delegate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MIN_WRITTEN_BYTES
public static final int DEFAULT_MIN_WRITTEN_BYTES
- See Also:
- Constant Field Values
ThrottledIndexOutput
public ThrottledIndexOutput(int bytesPerSecond,
long delayInMillis,
IndexOutput delegate)
ThrottledIndexOutput
public ThrottledIndexOutput(int bytesPerSecond,
long delays,
int minBytesWritten,
IndexOutput delegate)
ThrottledIndexOutput
public ThrottledIndexOutput(int bytesPerSecond,
long flushDelayMillis,
long closeDelayMillis,
long seekDelayMillis,
long minBytesWritten,
IndexOutput delegate)
newFromDelegate
public ThrottledIndexOutput newFromDelegate(IndexOutput output)
mBitsToBytes
public static final int mBitsToBytes(int mbits)
flush
public void flush()
throws IOException
- Specified by:
flush
in class IndexOutput
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class IndexOutput
- Throws:
IOException
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in class IndexOutput
seek
public void seek(long pos)
throws IOException
- Specified by:
seek
in class IndexOutput
- Throws:
IOException
length
public long length()
throws IOException
- Specified by:
length
in class IndexOutput
- Throws:
IOException
writeByte
public void writeByte(byte b)
throws IOException
- Specified by:
writeByte
in class DataOutput
- Throws:
IOException
writeBytes
public void writeBytes(byte[] b,
int offset,
int length)
throws IOException
- Specified by:
writeBytes
in class DataOutput
- Throws:
IOException
getDelay
protected long getDelay(boolean closing)
setLength
public void setLength(long length)
throws IOException
- Overrides:
setLength
in class IndexOutput
- Throws:
IOException
copyBytes
public void copyBytes(DataInput input,
long numBytes)
throws IOException
- Overrides:
copyBytes
in class DataOutput
- Throws:
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.