|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object FileAttribute
public class FileAttribute
A class for storing related information regarding to a
File
entity.
Constructor Summary | |
---|---|
FileAttribute(String fileName,
int fileSize)
Allocates a new FileAttribute class. |
Method Summary | |
---|---|
boolean |
copyValue(FileAttribute attr)
Copy the values of this object into another FileAttribute class |
int |
getAttributeSize()
Gets the size of this object (in byte). NOTE: This object size is NOT the actual file size. |
int |
getChecksum()
Gets the file checksum |
double |
getCost()
Gets the cost associated with this file |
long |
getCreationTime()
Gets the file creation time (in millisecond) |
int |
getFileSize()
Gets the file size (in MBytes) |
int |
getFileSizeInByte()
Gets the file size (in bytes) |
double |
getLastUpdateTime()
Gets the last update time (in seconds) |
String |
getName()
Returns the file name |
String |
getOwnerName()
Gets the owner name of this file |
int |
getRegistrationID()
Gets the file registration ID |
int |
getResourceID()
Gets the resource ID that stores this file |
int |
getType()
Gets this file type |
boolean |
isMasterCopy()
Checks whether this file is a master copy or replica |
boolean |
isReadOnly()
Checks whether this file is a read only or not |
boolean |
isRegistered()
Checks if this file already registered to a Replica Catalogue |
boolean |
setChecksum(int checksum)
Sets the checksum of this file |
boolean |
setCost(double cost)
Sets the cost associated with this file |
boolean |
setCreationTime(long creationTime)
Sets the file creation time (in millisecond) |
boolean |
setFileSize(int fileSize)
Sets the file size (in MBytes) |
void |
setMasterCopy(boolean masterCopy)
Marks this file as a master copy or replica |
void |
setName(String name)
Sets the file name |
boolean |
setOwnerName(String name)
Sets the owner name of this file |
void |
setReadOnly(boolean readOnly)
Marks this file as a read only or not |
boolean |
setRegistrationID(int id)
Sets the file registration ID (published by a Replica Catalogue entity) |
boolean |
setResourceID(int resourceID)
Sets the resource ID that stores this file |
boolean |
setType(int type)
Sets the file type (e.g. |
boolean |
setUpdateTime(double time)
Sets the last update time of this file (in seconds) NOTE: This time is relative to the start time. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileAttribute(String fileName, int fileSize) throws ParameterException
fileName
- file namefileSize
- size of this file (in bytes)
ParameterException
- This happens when one of the following
scenarios occur:
Method Detail |
---|
public boolean copyValue(FileAttribute attr)
attr
- a FileAttribute object (the destination)
public boolean setCreationTime(long creationTime)
creationTime
- the file creation time (in millisecond)
public long getCreationTime()
public boolean setResourceID(int resourceID)
resourceID
- a resource ID
public int getResourceID()
public boolean setOwnerName(String name)
name
- the owner name
public String getOwnerName()
public int getAttributeSize()
public boolean setFileSize(int fileSize)
fileSize
- the file size (in MBytes)
public int getFileSize()
public int getFileSizeInByte()
public boolean setUpdateTime(double time)
GridSim.clock()
method.
time
- the last update time (in seconds)
public double getLastUpdateTime()
public boolean setRegistrationID(int id)
id
- registration ID
public int getRegistrationID()
public boolean setType(int type)
type
- a file type
public int getType()
public boolean setChecksum(int checksum)
checksum
- the checksum of this file
public int getChecksum()
public boolean setCost(double cost)
cost
- cost of this file
public double getCost()
public boolean isRegistered()
public void setMasterCopy(boolean masterCopy)
masterCopy
- a flag denotes true for master copy or
false for a replicapublic boolean isMasterCopy()
public void setReadOnly(boolean readOnly)
readOnly
- a flag denotes true for read only or
false for re-writeablepublic boolean isReadOnly()
public void setName(String name)
name
- the file namepublic String getName()
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |