org.entityfs.util.nio
Class LockAwareReadableByteChannel
java.lang.Object
org.entityfs.support.lang.ObjectProxySupport<T>
org.entityfs.support.io.ChannelProxy<T>
org.entityfs.support.io.ReadableByteChannelProxy<ReadableByteChannel>
org.entityfs.util.nio.LockAwareReadableByteChannel
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel
public class LockAwareReadableByteChannel
- extends ReadableByteChannelProxy<ReadableByteChannel>
|
Method Summary |
void |
close()
This will unlock the write lock if it is still locked by the current
thread. |
int |
read(ByteBuffer src)
|
| Methods inherited from interface java.nio.channels.Channel |
isOpen |
LockAwareReadableByteChannel
public LockAwareReadableByteChannel(ReadableByteChannel proxied,
EntityLock lock)
close
public void close()
throws IOException
- This will unlock the write lock if it is still locked by the current
thread.
- Specified by:
close in interface Closeable- Specified by:
close in interface Channel- Overrides:
close in class ChannelProxy<ReadableByteChannel>
- Throws:
IOException
read
public int read(ByteBuffer src)
throws IOException
- Specified by:
read in interface ReadableByteChannel- Overrides:
read in class ReadableByteChannelProxy<ReadableByteChannel>
- Throws:
IOException