T
- type of read request@ThreadSafe public class ReadRequestContext<T extends alluxio.worker.grpc.ReadRequest> extends Object
Constructor and Description |
---|
ReadRequestContext(T request) |
Modifier and Type | Method and Description |
---|---|
com.codahale.metrics.Counter |
getCounter() |
alluxio.worker.grpc.Error |
getError() |
com.codahale.metrics.Meter |
getMeter() |
long |
getPosReceived() |
long |
getPosToQueue() |
T |
getRequest() |
boolean |
isCancel() |
boolean |
isDataReaderActive() |
boolean |
isDoneUnsafe() |
boolean |
isEof() |
void |
setCancel(boolean cancel) |
void |
setCounter(com.codahale.metrics.Counter counter) |
void |
setDataReaderActive(boolean packetReaderActive) |
void |
setDoneUnsafe(boolean done) |
void |
setEof(boolean eof) |
void |
setError(alluxio.worker.grpc.Error error) |
void |
setMeter(com.codahale.metrics.Meter meter) |
void |
setPosReceived(long posReceived) |
void |
setPosToQueue(long posToQueue) |
public ReadRequestContext(T request)
request
- the read requestpublic T getRequest()
public boolean isDataReaderActive()
public long getPosToQueue()
public long getPosReceived()
public boolean isEof()
public boolean isCancel()
@Nullable public alluxio.worker.grpc.Error getError()
public boolean isDoneUnsafe()
@Nullable public com.codahale.metrics.Counter getCounter()
@Nullable public com.codahale.metrics.Meter getMeter()
public void setDataReaderActive(boolean packetReaderActive)
packetReaderActive
- packet reader state to setpublic void setPosToQueue(long posToQueue)
posToQueue
- the next position to queue to the netty buffer to setpublic void setPosReceived(long posReceived)
posReceived
- the position before which data are received by the clientpublic void setEof(boolean eof)
eof
- whether SUCCESS response is repliedpublic void setCancel(boolean cancel)
cancel
- whether the CANCEL request is receivedpublic void setError(alluxio.worker.grpc.Error error)
error
- the errorpublic void setDoneUnsafe(boolean done)
done
- whether the SUCCESS or CANCEL response is sentpublic void setCounter(com.codahale.metrics.Counter counter)
counter
- counter to setpublic void setMeter(com.codahale.metrics.Meter meter)
meter
- meter to setCopyright © 2023. All Rights Reserved.