Class RateLimitedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.DataOutputStream
-
- org.apache.accumulo.core.file.streams.RateLimitedOutputStream
-
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
public class RateLimitedOutputStream extends DataOutputStream
A decorator forOutputStreamwhich limits the rate at which data may be written. Underlying OutputStream is a FSDataOutputStream.
-
-
Field Summary
-
Fields inherited from class java.io.DataOutputStream
written
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description RateLimitedOutputStream(org.apache.hadoop.fs.FSDataOutputStream fsDataOutputStream, RateLimiter writeLimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longposition()voidwrite(byte[] buffer, int offset, int length)voidwrite(int i)-
Methods inherited from class java.io.DataOutputStream
flush, size, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.io.FilterOutputStream
write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataOutput
write
-
-
-
-
Constructor Detail
-
RateLimitedOutputStream
public RateLimitedOutputStream(org.apache.hadoop.fs.FSDataOutputStream fsDataOutputStream, RateLimiter writeLimiter)
-
-
Method Detail
-
write
public void write(int i) throws IOException- Specified by:
writein interfaceDataOutput- Overrides:
writein classDataOutputStream- Throws:
IOException
-
write
public void write(byte[] buffer, int offset, int length) throws IOException- Specified by:
writein interfaceDataOutput- Overrides:
writein classDataOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
position
public long position()
-
-