@NotThreadSafe public final class UfsFallbackBlockWriteHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected AuthenticatedUserInfo |
mUserInfo |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelRequest(BlockWriteRequestContext context)
Cancels this write.
|
protected void |
cleanupRequest(BlockWriteRequestContext context)
Cleans up this write.
|
protected void |
completeRequest(BlockWriteRequestContext context)
Completes this write.
|
protected BlockWriteRequestContext |
createRequestContext(WriteRequest msg)
Creates a new request context.
|
protected void |
flushRequest(BlockWriteRequestContext context)
Flushes the buffered data.
|
protected void |
handleCommand(WriteRequestCommand command,
BlockWriteRequestContext context)
Handles a command in the write request.
|
void |
onCancel()
Handles request cancellation event.
|
void |
onCompleted()
Handles request complete event.
|
void |
onError(Throwable cause)
Handles errors from the request.
|
void |
write(WriteRequest writeRequest)
Handles write request.
|
protected void |
writeBuf(BlockWriteRequestContext context,
io.grpc.stub.StreamObserver<WriteResponse> responseObserver,
DataBuffer buf,
long pos)
Writes the buffer.
|
void |
writeDataMessage(WriteRequest request,
DataBuffer buffer)
Handles write request with data message.
|
protected AuthenticatedUserInfo mUserInfo
protected BlockWriteRequestContext createRequestContext(WriteRequest msg) throws Exception
msg
- the block write requestException
protected void completeRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void cancelRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void cleanupRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void flushRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void writeBuf(BlockWriteRequestContext context, io.grpc.stub.StreamObserver<WriteResponse> responseObserver, DataBuffer buf, long pos) throws Exception
context
- context of the request to completeresponseObserver
- the response observerbuf
- the bufferpos
- the posException
protected void handleCommand(WriteRequestCommand command, BlockWriteRequestContext context) throws Exception
command
- the command to be handledException
public void write(WriteRequest writeRequest)
writeRequest
- the request from the clientpublic void writeDataMessage(WriteRequest request, DataBuffer buffer)
request
- the request from the clientbuffer
- the data associated with the requestpublic void onCompleted()
public void onCancel()
public void onError(Throwable cause)
cause
- the exceptionCopyright © 2023. All Rights Reserved.