Class NfsTime
java.lang.Object
com.emc.ecs.nfsclient.nfs.NfsTime
- All Implemented Interfaces:
NfsRequest, NfsResponse
NFS time getter and setter handling, as specified by RFC 1813
(https://tools.ietf.org/html/rfc1813).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNfsTime()Create a new NfsTime for the current time.NfsTime(long milliseconds) Create a new NfsTime for the setting time corresponding to milliseconds.NfsTime(long milliseconds, boolean isSettingTime) Create a new NfsTime for the setting or guard time corresponding to milliseconds. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns time in milliseconds, same as java.util.Calendar.booleanReturns true if this is a bare time (with no time setting type), false otherwise.voidmarshalling(Xdr xdr) Transfer data to an Xdr object for RPC use.toString()voidunmarshalling(Xdr xdr) Transfer data from an Xdr object after RPC use.
-
Field Details
-
DO_NOT_CHANGE
This constant is the NfsTime passed to setters to indicate that the time should not be changed. -
SET_TO_CURRENT_ON_SERVER
This constant is the NfsTime passed to setters to indicate that the time should be reset to the current server time.
-
-
Constructor Details
-
NfsTime
public NfsTime()Create a new NfsTime for the current time. -
NfsTime
public NfsTime(long milliseconds) Create a new NfsTime for the setting time corresponding to milliseconds.- Parameters:
milliseconds- same as for java.util.Date.
-
NfsTime
public NfsTime(long milliseconds, boolean isSettingTime) Create a new NfsTime for the setting or guard time corresponding to milliseconds.- Parameters:
milliseconds- same as for java.util.Date.isSettingTime- true if the time is to be used for setting a value, false if not (e.g., guard time)
-
-
Method Details
-
isBareTime
public boolean isBareTime()Returns true if this is a bare time (with no time setting type), false otherwise. -
toString
-
marshalling
Transfer data to an Xdr object for RPC use. The format is specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Specified by:
marshallingin interfaceNfsRequest- Parameters:
xdr- the Xdr to be sent.
-
unmarshalling
Transfer data from an Xdr object after RPC use. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Specified by:
unmarshallingin interfaceNfsResponse- Parameters:
xdr- the returned Xdr.
-
getTimeInMillis
public long getTimeInMillis()Returns time in milliseconds, same as java.util.Calendar.
-