class TcpTransport.RateLimitingChannel
extends java.lang.Object
implements java.nio.channels.ScatteringByteChannel, java.nio.channels.GatheringByteChannel
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
read_allowance |
(package private) boolean |
read_suspended |
(package private) int |
write_allowance |
(package private) boolean |
write_suspended |
| Constructor and Description |
|---|
RateLimitingChannel() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
int |
read(java.nio.ByteBuffer dst) |
long |
read(java.nio.ByteBuffer[] dsts) |
long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length) |
void |
resetAllowance() |
void |
resumeRead() |
int |
write(java.nio.ByteBuffer src) |
long |
write(java.nio.ByteBuffer[] srcs) |
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
int read_allowance
boolean read_suspended
int write_allowance
boolean write_suspended
public void resetAllowance()
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic void resumeRead()
public long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic long read(java.nio.ByteBuffer[] dsts)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
write in interface java.nio.channels.GatheringByteChanneljava.io.IOExceptionpublic long write(java.nio.ByteBuffer[] srcs)
throws java.io.IOException
write in interface java.nio.channels.GatheringByteChanneljava.io.IOException