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 |
CLEANUP_BIT_FLAG
If set, means can be considered for cleanup
|
static int |
DATA_FILE
The type denoting that a logical file is a data file.
|
static java.lang.String |
DATA_TYPE
The string value of a file that is of type data.
|
static int |
DO_NOT_REGISTER_BIT_FLAG
The index of the flags field which when set indicates that the file is
not to be registered in the RLS/ RC.
|
static int |
EXECUTABLE_FILE
The type denoting that a logical file is a executable file.
|
static java.lang.String |
EXECUTABLE_TYPE
The string value of a file that is of type executable.
|
protected java.util.BitSet |
mFlags
The transient flags field which is kept as a bit field.
|
protected PegasusFile.LINKAGE |
mLink
Linkage of the file.
|
protected java.lang.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 |
OPTIONAL_BIT_FLAG
The index of the flags field which when set indicates that the file
is to be considered optional.
|
static int |
OTHER_FILE
The type denoting that a logical file is an other file.
|
static java.lang.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.
|
Constructor and Description |
---|
PegasusFile()
The default constructor.
|
PegasusFile(java.lang.String logName)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeCleanedup()
Returns cleanup denoting whether the file can be cleaned up or not
|
java.lang.Object |
clone()
Returns a copy of the existing data object.
|
boolean |
equals(java.lang.Object o)
Checks if an object is similar to the one referred to by this class.
|
boolean |
fileOptional()
Returns optional flag denoting the file to be optional or not.
|
java.util.BitSet |
getFlags()
Returns the bit fields that contain the transient flags (dR and optional).
|
java.lang.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.
|
boolean |
isExecutable()
Returns a boolean indicating if a file that is being staged is an
executable or not (i.e is a data file).
|
void |
setFileOptional()
Sets the optional flag denoting the file to be optional to true.
|
void |
setForCleanup()
Sets the cleanup flag denoting the file can be cleaned up to true.
|
void |
setForCleanup(boolean value)
Sets the cleanup flag to the value passed
|
void |
setLFN(java.lang.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(java.lang.String size)
Sets the size for the file.
|
void |
setTransferFlag(int transfer)
Sets the transient transfer flag to value passed.
|
void |
setTransferFlag(java.lang.String flag)
Sets the transient transfer flag corresponding to the string
value of transfer mode passed.
|
void |
setTransferFlag(java.lang.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(java.lang.String type)
Sets the transient transfer flag to value passed.
|
java.lang.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.
|
java.lang.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 OPTIONAL_BIT_FLAG
public static final int DO_NOT_REGISTER_BIT_FLAG
public static final int CLEANUP_BIT_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 java.lang.String DATA_TYPE
DATA_FILE
,
Constant Field Valuespublic static final java.lang.String EXECUTABLE_TYPE
DATA_FILE
,
Constant Field Valuespublic static final java.lang.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 java.lang.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 java.util.BitSet mFlags
protected double mSize
public PegasusFile()
public PegasusFile(java.lang.String logName)
logName
- the logical name of the file.public void setLinkage(PegasusFile.LINKAGE link)
link
- linkage typepublic PegasusFile.LINKAGE getLinkage()
public java.lang.String getLFN()
public void setLFN(java.lang.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(java.lang.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 java.lang.IllegalArgumentException
type
- valid transfer value.java.lang.IllegalArgumentException
- if the transfer mode is outside
its legal range.DATA_FILE
,
EXECUTABLE_FILE
public void setType(java.lang.String type) throws java.lang.IllegalArgumentException
type
- valid transfer value.java.lang.IllegalArgumentException
- if the transfer mode is outside
its legal range.DATA_FILE
,
EXECUTABLE_FILE
public void setTransferFlag(int transfer) throws java.lang.IllegalArgumentException
transfer
- valid transfer value.java.lang.IllegalArgumentException
- if the transfer mode is outside
its legal range.TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public void setTransferFlag(java.lang.String flag) throws java.lang.IllegalArgumentException
flag
- tri-state transfer value as got from dontTransfer flag.java.lang.IllegalArgumentException
- if the transfer mode is outside
its legal range.TRANSFER_MANDATORY
,
TRANSFER_NOT
,
TRANSFER_OPTIONAL
public void setTransferFlag(java.lang.String flag, boolean doubleNegative) throws java.lang.IllegalArgumentException
flag
- tri-state transfer value as got from dontTransfer flag.doubleNegative
- indicates whether a double negative or not.java.lang.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 void setForCleanup()
public void setForCleanup(boolean value)
value
- the boolean value to which the flag should be set to.public boolean canBeCleanedup()
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 java.util.BitSet getFlags()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isExecutable()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String typeToString()