Package com.usatiuk.dhfsfs.objects
Record Class File
java.lang.Object
java.lang.Record
com.usatiuk.dhfsfs.objects.File
- Record Components:
key- unique keymode- file modecTime- inode modification timemTime- modification timesymlink- true if the file is a symlink, false otherwise
- All Implemented Interfaces:
JMapHolder<JMapLongKey>,JDataRemote,JData,Serializable
public record File(JObjectKey key, long mode, long cTime, long mTime, boolean symlink)
extends Record
implements JDataRemote, JMapHolder<JMapLongKey>
File is a data structure that represents a file in the file system
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFile(JObjectKey key, long mode, long cTime, long mTime, boolean symlink) Creates an instance of aFilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionCollect outgoing references to other objects.longcTime()Returns the value of thecTimerecord component.Class<? extends JDataRemoteDto> dtoClass()Returns the class of DTO of this object that should be used for remote synchronization.final booleanIndicates whether some other object is "equal to" this one.intReturns the estimated size of this remote object in bytes.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.longmode()Returns the value of themoderecord component.longmTime()Returns the value of themTimerecord component.booleansymlink()Returns the value of thesymlinkrecord component.final StringtoString()Returns a string representation of this record class.withCTime(long cTime) withMode(long mode) withMTime(long mTime) withSymlink(boolean symlink)
-
Constructor Details
-
File
Creates an instance of aFilerecord class.
-
-
Method Details
-
withSymlink
-
withMode
-
withCTime
-
withMTime
-
withCurrentMTime
-
withCurrentCTime
-
collectRefsTo
Description copied from interface:JDataRemoteCollect outgoing references to other objects.- Specified by:
collectRefsToin interfaceJDataRemote- Returns:
- list of outgoing references
-
estimateSize
public int estimateSize()Description copied from interface:JDataRemoteReturns the estimated size of this remote object in bytes.- Specified by:
estimateSizein interfaceJData- Specified by:
estimateSizein interfaceJDataRemote- Returns:
- the estimated size of this remote object in bytes
-
dtoClass
Description copied from interface:JDataRemoteReturns the class of DTO of this object that should be used for remote synchronization. It can be the same as the object.- Specified by:
dtoClassin interfaceJDataRemote- Returns:
- the class of DTO of this object that should be used for remote synchronization
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfaceJData- Specified by:
keyin interfaceJDataRemote- Returns:
- the value of the
keyrecord component
-
mode
public long mode()Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
cTime
public long cTime()Returns the value of thecTimerecord component.- Returns:
- the value of the
cTimerecord component
-
mTime
public long mTime()Returns the value of themTimerecord component.- Returns:
- the value of the
mTimerecord component
-
symlink
public boolean symlink()Returns the value of thesymlinkrecord component.- Returns:
- the value of the
symlinkrecord component
-