public class PegasusFile extends Data
Modifier and Type | Class and Description |
---|---|
static class |
PegasusFile.LINKAGE
Enumeration for denoting type of linkage
|
Modifier and Type | Field and Description |
---|---|
static int |
DATA_FILE
The type denoting that a logical file is a data file.
|
static String |
DATA_TYPE
The string value of a file that is of type data.
|
static int |
EXECUTABLE_FILE
The type denoting that a logical file is a executable file.
|
static String |
EXECUTABLE_TYPE
The string value of a file that is of type executable.
|
protected BitSet |
mFlags
The transient flags field which is kept as a bit field.
|
protected PegasusFile.LINKAGE |
mLink
Linkage of the file.
|
protected String |
mLogicalFile
The logical name of the file.
|
protected double |
mSize
The size of the file.
|
protected int |
mTransferFlag
The transfer flag associated with the file containing tristate of
transfer,dontTransfer and optional.
|
protected int |
mType
The type associated with the file.
|
static int |
NO_OF_TRANSIENT_FLAGS
The number of transient flags.
|
static int |
OTHER_FILE
The type denoting that a logical file is an other file.
|
static String |
OTHER_TYPE
The string value of a file that is of type other.
|
static int |
TRANSFER_MANDATORY
The mode where the transfer for this file to the pool
is constructed and the transfer job fails if the transfer fails.
|
static int |
TRANSFER_NOT
The mode where the transfer for this file is not constructed.
|
static int |
TRANSFER_OPTIONAL
The mode where the transfer for this file to the pool is constructed,
but the transfer job should not fail if the transfer fails.
|
static int |
TRANSIENT_OPTIONAL_FLAG
The index of the flags field which when set indicates that the file
is to be considered optional.
|
static int |
TRANSIENT_REGISTRATION_FLAG
The index of the flags field which when set indicates that the file is
not to be registered in the RLS/ RC.
|
Constructor and Description |
---|
PegasusFile()
The default constructor.
|
PegasusFile(String logName)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of the existing data object.
|
boolean |
equals(Object o)
Checks if an object is similar to the one referred to by this class.
|
boolean |
fileOptional()
Returns optionalflag denoting the file to be optional or not.
|
BitSet |
getFlags()
Returns the bit fields that contain the transient flags (dR and optional).
|
String |
getLFN()
It returns the lfn of the file that is associated with this transfer.
|
PegasusFile.LINKAGE |
getLinkage()
Returns the linkage for the file during parsing.
|
boolean |
getRegisterFlag()
Returns the value of the register flag
|
double |
getSize()
Returns the size for the file.
|
int |
getTransferFlag()
Returns the tristate transfer mode that is associated with the file.
|
boolean |
getTransientRegFlag()
Returns the transient registration flag (the value of dontRegister).
|
boolean |
getTransientTransferFlag()
Returns whether the transfer is transient or not.
|
int |
getType()
Returns the tristate transfer mode that is associated with the file.
|
int |
hashCode()
Calculate a hash code value for the object to support hash tables.
|
void |
setFileOptional()
Sets the optionalflag denoting the file to be optional to true.
|
void |
setLFN(String lfn)
It sets the logical filename of the file that is being transferred.
|
void |
setLinkage(PegasusFile.LINKAGE link)
Sets the linkage for the file during parsing.
|
void |
setRegisterFlag(boolean value)
Sets the transient registration flag to value specified.
|
void |
setSize(double size)
Sets the size for the file.
|
void |
setSize(String size)
Sets the size for the file.
|
void |
setTransferFlag(int transfer)
Sets the transient transfer flag to value passed.
|
void |
setTransferFlag(String flag)
Sets the transient transfer flag corresponding to the string
value of transfer mode passed.
|
void |
setTransferFlag(String flag,
boolean doubleNegative)
Sets the transient transfer flag corresponding to the string
value of transfer mode passed.
|
void |
setTransientRegFlag()
Deprecated.
|
void |
setType(int type)
Sets the type flag to value passed.
|
void |
setType(String type)
Sets the transient transfer flag to value passed.
|
String |
toString()
Returns the String version of the data object, which is in human readable
form.
|
boolean |
transferInRange(int transfer)
Returns whether the transfer value for the mode is in range or not.
|
String |
typeToString()
Returns the type associated with the logical file.
|
boolean |
typeValid(int type)
Returns whether the type of file value is valid or not.
|
setToString, vectorToString
public static final int TRANSIENT_OPTIONAL_FLAG
public static final int TRANSIENT_REGISTRATION_FLAG
public static final int NO_OF_TRANSIENT_FLAGS
public static final int TRANSFER_MANDATORY
public static final int TRANSFER_OPTIONAL
public static final int TRANSFER_NOT
public static final String DATA_TYPE
DATA_FILE
,
Constant Field Valuespublic static final String EXECUTABLE_TYPE
DATA_FILE
,
Constant Field Valuespublic static final String OTHER_TYPE
OTHER_FILE
,
Constant Field Valuespublic static final int DATA_FILE
public static final int EXECUTABLE_FILE
public static final int OTHER_FILE
protected String mLogicalFile
protected int mType
DATA_FILE
,
EXECUTABLE_FILE
,
OTHER_FILE
protected PegasusFile.LINKAGE mLink
protected int mTransferFlag
TRANSFER_MANDATORY
,
TRANSFER_OPTIONAL
,
TRANSFER_NOT
protected BitSet mFlags
protected double mSize
public PegasusFile()
public PegasusFile(String logName)
logName
- the logical name of the file.public void setLinkage(PegasusFile.LINKAGE link)
link
- linkage typepublic PegasusFile.LINKAGE getLinkage()
public String getLFN()
public void setLFN(String lfn)
lfn
- the logical name of the file that this transfer is associated
with.public void setSize(double size)
size
- the size of the file.public void setSize(String size)
size
- the size of the file.public double getSize()
public boolean typeValid(int type)
type
- the value for the type of file.public boolean transferInRange(int transfer)
transfer
- the value for the transfer.public void setType(int type) throws IllegalArgumentException
type
- valid transfer value.IllegalArgumentException
- if the transfer mode is outside
its legal range.DATA_FILE
,
EXECUTABLE_FILE
public void setType(String type) throws IllegalArgumentException
type
- valid transfer value.IllegalArgumentException
- if the transfer mode is outside
its legal range.DATA_FILE
,
EXECUTABLE_FILE
public void setTransferFlag(int transfer) throws IllegalArgumentException
transfer
- valid transfer value.IllegalArgumentException
- if the transfer mode is outside
its legal range.TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public void setTransferFlag(String flag) throws IllegalArgumentException
flag
- tri-state transfer value as got from dontTransfer flag.IllegalArgumentException
- if the transfer mode is outside
its legal range.TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public void setTransferFlag(String flag, boolean doubleNegative) throws IllegalArgumentException
flag
- tri-state transfer value as got from dontTransfer flag.doubleNegative
- indicates whether a double negative or not.IllegalArgumentException
- if the transfer mode is outside
its legal range.TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public boolean getTransientTransferFlag()
public void setTransientRegFlag()
setRegisterFlag( boolean )
public void setRegisterFlag(boolean value)
value
- the value to set topublic void setFileOptional()
public boolean fileOptional()
public int getType()
DATA_FILE
,
EXECUTABLE_FILE
,
OTHER_FILE
public int getTransferFlag()
TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public boolean getRegisterFlag()
public boolean getTransientRegFlag()
public BitSet getFlags()
public boolean equals(Object o)
public int hashCode()
public Object clone()
public String typeToString()
Copyright © 2011 The University of Southern California. All Rights Reserved.