Package org.apache.storm.daemon.nimbus
Class TimedWritableByteChannel
- java.lang.Object
-
- org.apache.storm.metric.timed.Timed<T>
-
- org.apache.storm.metric.timed.TimedResource<WritableByteChannel>
-
- org.apache.storm.daemon.nimbus.TimedWritableByteChannel
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,WritableByteChannel
,TimerDecorated
public class TimedWritableByteChannel extends TimedResource<WritableByteChannel> implements WritableByteChannel
-
-
Constructor Summary
Constructors Constructor Description TimedWritableByteChannel(WritableByteChannel measured, com.codahale.metrics.Timer timer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
isOpen()
int
write(ByteBuffer src)
-
Methods inherited from class org.apache.storm.metric.timed.Timed
getMeasured, stopTiming
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.storm.metric.timed.TimerDecorated
stopTiming
-
-
-
-
Constructor Detail
-
TimedWritableByteChannel
public TimedWritableByteChannel(WritableByteChannel measured, com.codahale.metrics.Timer timer)
-
-
Method Detail
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceTimerDecorated
- Overrides:
close
in classTimedResource<WritableByteChannel>
- Throws:
IOException
-
-