Class NfsWriteResponse

Direct Known Subclasses:
Nfs3WriteResponse

public class NfsWriteResponse extends NfsResponseBase
The response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).

Procedure WRITE writes data to a file.

  • 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

      public void unmarshalling(Xdr xdr) throws RpcException
      Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).
      Overrides:
      unmarshalling in class NfsResponseBase
      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

      public NfsWccData 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.