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