Class NfsWriteResponse
java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcResponse
com.emc.ecs.nfsclient.nfs.NfsResponseBase
com.emc.ecs.nfsclient.nfs.NfsWriteResponse
- Direct Known Subclasses:
Nfs3WriteResponse
The response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
Procedure WRITE writes data to a file.
-
Field Summary
Fields inherited from class RpcResponse
_xid -
Constructor Summary
ConstructorsConstructorDescriptionNfsWriteResponse(int nfsVersion) Creates the response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). -
Method Summary
Modifier and TypeMethodDescriptionintReturns one of the values below.intgetCount()Returns the number of bytes of data written to the file.Returns weak cache consistency data for the file.longgetVerf()Returns this is a cookie that the client can use to determine whether the server has changed state between a call to WRITE and a subsequent call to either WRITE or COMMIT.voidunmarshalling(Xdr xdr) Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).Methods inherited from class NfsResponseBase
getAttributes, getFileHandle, getState, makeNfsGetAttributes, makeNfsGetAttributes, stateIsOk, toString, unmarshallingAttributes, unmarshallingAttributes, unmarshallingFileHandle, unmarshallingFileHandleMethods inherited from class RpcResponse
getAcceptStatus, getDirection, getRejectStatus, getReplyStatus, getXid
-
Constructor Details
-
NfsWriteResponse
public NfsWriteResponse(int nfsVersion) Creates the response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure WRITE writes data to a file.
- Parameters:
nfsVersion- The NFS version number. This is ignored for now, as only NFSv3 is supported, but is included to allow future support for other versions.
-
-
Method Details
-
unmarshalling
Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).- Overrides:
unmarshallingin classNfsResponseBase- Parameters:
xdr- The xdr response data.- Throws:
RpcException
-
getCommitted
public int getCommitted()Returns one of the values below.- UNSTABLE = 0 - Best effort was made, no promises.
- DATA_SYNC = 1 - Committed all data to stable storage, plus enough metadata for retrieval, before returning.
- FILE_SYNC = 2 - Committed all data and metadata to stable storage before returning.
-
getCount
public int getCount()Returns the number of bytes of data written to the file. The server may write fewer bytes than requested. If so, the actual number of bytes written starting at location,offset, is returned. -
getFileWccData
Returns weak cache consistency data for the file. -
getVerf
public long getVerf()Returns this is a cookie that the client can use to determine whether the server has changed state between a call to WRITE and a subsequent call to either WRITE or COMMIT. This cookie must be consistent during a single instance of the NFS version 3 protocol service and must be unique between instances of the NFS version 3 protocol server, where uncommitted data may be lost.
-