T
- type of the write request@ThreadSafe public class WriteRequestContext<T extends alluxio.worker.netty.WriteRequest> extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
mPosToWrite
The next pos to write to the block worker.
|
Constructor and Description |
---|
WriteRequestContext(T request) |
Modifier and Type | Method and Description |
---|---|
com.codahale.metrics.Counter |
getCounter() |
alluxio.worker.netty.Error |
getError() |
Queue<io.netty.buffer.ByteBuf> |
getPackets() |
long |
getPosToQueue() |
long |
getPosToWrite() |
T |
getRequest() |
boolean |
isDoneUnsafe() |
boolean |
isPacketWriterActive() |
void |
setCounter(com.codahale.metrics.Counter counter) |
void |
setDoneUnsafe(boolean done) |
void |
setError(alluxio.worker.netty.Error error) |
void |
setPacketWriterActive(boolean packetWriterActive) |
void |
setPosToQueue(long posToQueue) |
void |
setPosToWrite(long posToWrite) |
protected volatile long mPosToWrite
public WriteRequestContext(T request)
request
- the write requestpublic T getRequest()
public Queue<io.netty.buffer.ByteBuf> getPackets()
public boolean isPacketWriterActive()
@Nullable public alluxio.worker.netty.Error getError()
public long getPosToQueue()
public long getPosToWrite()
@Nullable public com.codahale.metrics.Counter getCounter()
public boolean isDoneUnsafe()
public void setPacketWriterActive(boolean packetWriterActive)
packetWriterActive
- whether the packet writer is activepublic void setError(alluxio.worker.netty.Error error)
error
- the errorpublic void setPosToQueue(long posToQueue)
posToQueue
- the next position to queue to the bufferpublic void setPosToWrite(long posToWrite)
posToWrite
- the next position to write to the block workerpublic void setDoneUnsafe(boolean done)
done
- whether the EOF or CANCEL is receivedpublic void setCounter(com.codahale.metrics.Counter counter)
counter
- counter to setCopyright © 2023. All Rights Reserved.