public class DbTaskRunner extends AbstractDbDataDao<Transfer>
Modifier and Type | Class and Description |
---|---|
static class |
DbTaskRunner.Columns |
static class |
DbTaskRunner.TASKSTEP
GlobalStep Bounds
|
AbstractDbData.UpdatedInfo
Modifier and Type | Field and Description |
---|---|
static int[] |
dbTypes |
static String |
fieldseq |
static DbTaskRunner.Columns[] |
indexes |
protected static String |
insertAllValues |
static String |
JSON_ORIGINALSIZE |
static String |
JSON_RESCHEDULE |
static String |
JSON_THROUGHMODE |
static int |
NBPRKEY
Special For DbTaskRunner
|
protected static String |
selectAllFields |
static String |
table |
protected static String |
updateAllFields |
static String |
XMLEXTENSION |
static String |
XMLRUNNER |
static String |
XMLRUNNERS |
JSON_MODEL, pojo
allFields, dbSession, isSaved, otherFields, primaryKey
Constructor and Description |
---|
DbTaskRunner(DbRule rule,
boolean isSender,
RequestPacket requestPacket,
String requested,
Timestamp startTime)
Constructor for submission (no transfer session), from database.
|
DbTaskRunner(long id,
String requested)
Constructor to initiate a request with a valid previous Special Id so
loaded from database.
|
DbTaskRunner(long id,
String requester,
String requested)
Minimal constructor from database
|
DbTaskRunner(long id,
String requester,
String requested,
String owner)
Minimal constructor from database
|
DbTaskRunner(com.fasterxml.jackson.databind.node.ObjectNode source)
To create a new DbTaskRunner (specialId could be invalid) without making
any entry in the database
|
DbTaskRunner(R66Session session,
DbRule rule,
boolean isSender,
RequestPacket requestPacket)
Constructor from a request without a valid Special Id to be inserted into
databases
|
DbTaskRunner(R66Session session,
DbRule rule,
long id,
String requester,
String requested)
Constructor from a request with a valid Special Id so loaded from
database
|
DbTaskRunner(Transfer transfer) |
Modifier and Type | Method and Description |
---|---|
void |
addToTransferMap(String key,
Object value)
Helper to set a new (key, value) in the map Transfer
|
String |
asXML() |
String |
backendXmlFilename() |
static void |
changeFinishedToDone()
Change CompleteOk+ALLDONETASK to Updated = DONE TaskRunner from database.
|
void |
changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
Change UpdatedInfo status
|
boolean |
checkFromDbForSubmit()
Shall be called to ensure that item is really available in database
|
void |
checkThroughMode() |
void |
clean() |
void |
clear()
Clear the runner
|
static int |
clearCache()
To enable clear of oldest entries in the cache
|
boolean |
continueTransfer() |
void |
create()
As insert but with the ability to change the SpecialId
|
static void |
createLruCache(int limit,
long ttl)
Create the LRU cache
|
void |
deleteTempFile()
Delete the temporary empty file (retrieved file at rank 0)
|
void |
deleteXmlWorkNoDb()
Delete the backend XML file for the current TaskRunner for NoDb Client
|
boolean |
exist()
Test the existence of the current object
|
boolean |
existXmlWorkNoDb() |
void |
finalizeTransfer(LocalChannelReference localChannelReference,
R66File file,
R66Result finalValue,
boolean status)
Once the transfer is over, finalize the Runner by running the error or
post
operation according to the
status.
|
static void |
finishSelectOrCountPrepareStatement(DbPreparedStatement pstt,
long time)
Set the current time in the given updatedPreparedStatement
|
int |
finishTransferTask(ErrorCode code)
Set the status of the transfer
|
boolean |
forceSaveStatus()
This method is to be called each time an operation is happening on Runner
and it is forced (for SelfRequest
handling)
|
long |
freespace(R66Session session,
boolean isWorkingPath) |
long |
freespaceMB(R66Session session) |
static DbTaskRunner |
fromStringXml(String xml,
boolean reverse)
Reload a to submitted runner from a remote partner's log (so reversing
isSender should be true)
|
int |
getBlocksize() |
static DbPreparedStatement |
getCountInfoPrepareStatement(DbSession session) |
static DbPreparedStatement |
getCountInOutErrorPrepareStatement(DbSession session,
boolean in)
Running or not transfers are concerned
|
static DbPreparedStatement |
getCountInOutRunningPrepareStatement(DbSession session,
boolean in,
boolean running)
Running or not transfers are concerned
|
static DbPreparedStatement |
getCountStatusPrepareStatement(DbSession session) |
static DbPreparedStatement |
getCountStatusRunningPrepareStatement(DbSession session,
ErrorCode status)
Only running transfers
|
static DbPreparedStatement |
getCountStepPrepareStatement(DbSession session,
DbTaskRunner.TASKSTEP globalstep) |
protected AbstractDAO<Transfer> |
getDao() |
ErrorCode |
getErrorInfo() |
String |
getFileInformation() |
String |
getFilename() |
static DbPreparedStatement |
getFilterPrepareStatement(DbSession session,
int limit,
boolean orderBySpecialId,
String startid,
String stopid,
Timestamp start,
Timestamp stop,
String rule,
String req,
boolean pending,
boolean transfer,
boolean error,
boolean done,
boolean all) |
static DbPreparedStatement |
getFilterPrepareStatement(DbSession session,
int limit,
boolean orderBySpecialId,
String startid,
String stopid,
Timestamp start,
Timestamp stop,
String rule,
String req,
boolean pending,
boolean transfer,
boolean error,
boolean done,
boolean all,
String owner) |
static DbTaskRunner |
getFromStatement(DbPreparedStatement preparedStatement)
For instance from Commander when getting updated information
|
static DbTaskRunner |
getFromStatementNoDbRule(DbPreparedStatement preparedStatement)
For REST interface, to prevent DbRule issue
|
static DbTaskRunner |
getFromStatementNoRule(DbPreparedStatement preparedStatement)
For instance from Commander when getting updated information
This version tries to load DbRule but will not make any error if not found!
|
Object |
getFromTransferMap(String key) |
String |
getFullFilePath() |
int |
getGloballaststep() |
DbTaskRunner.TASKSTEP |
getGlobalStep() |
com.fasterxml.jackson.databind.node.ObjectNode |
getJson()
Create the equivalent object in Json (no database access)
|
static String |
getJson(DbPreparedStatement preparedStatement,
int limit)
Write selected TaskRunners to a Json String
|
String |
getJsonAsString() |
String |
getKey()
Used internally
|
DbTaskRunner.TASKSTEP |
getLastGlobalStep() |
LocalChannelReference |
getLocalChannelReference() |
static DbPreparedStatement |
getLogPrepareStatement(DbSession session,
Timestamp start,
Timestamp stop) |
int |
getMode() |
String |
getOriginalFilename() |
long |
getOriginalSize() |
protected String |
getPrimaryField()
|
protected String |
getPrimaryKey()
|
int |
getRank() |
RequestPacket |
getRequest() |
String |
getRequested() |
static String |
getRequested(R66Session session,
RequestPacket requestPacket) |
String |
getRequester() |
static String |
getRequester(R66Session session,
RequestPacket requestPacket) |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt) |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt,
AbstractDbData.UpdatedInfo info,
long time) |
static long |
getResultCountPrepareStatement(DbPreparedStatement pstt,
ErrorCode error,
long time) |
DbRule |
getRule() |
String |
getRuleId() |
static DbTaskRunner[] |
getSelectFromInfoPrepareStatement(AbstractDbData.UpdatedInfo info,
boolean orderByStart,
int limit) |
static boolean |
getSenderByRequestPacket(RequestPacket request)
Helper
|
long |
getSpecialId() |
Timestamp |
getStart() |
ErrorCode |
getStatus() |
int |
getStep() |
Timestamp |
getStop() |
protected String |
getTable() |
AbstractTask |
getTask(String[] task,
R66Session tempSession) |
String |
getTransferInfo() |
Map<String,Object> |
getTransferMap() |
AbstractDbData.UpdatedInfo |
getUpdatedInfo() |
static String |
hashStatus() |
static String |
headerHtml() |
void |
incrementRank()
Increment the rank of the transfer
|
protected void |
initObject()
To setup primaryKey, otherFields, allFields.
|
boolean |
isAllDone() |
boolean |
isFileMoved() |
boolean |
isFinished() |
boolean |
isInError() |
boolean |
isInTransfer() |
boolean |
isPreTaskStarting()
To be called before executing Pre execution
|
boolean |
isRecvThrough() |
boolean |
isRescheduledTransfer() |
boolean |
isSelfRequest() |
boolean |
isSelfRequested() |
boolean |
isSender() |
boolean |
isSendThrough() |
static void |
loadXml(File logsFile)
Method to load several DbTaskRunner from File logs.
|
void |
loadXmlWorkNoDb()
Method to load a previous existing DbTaskRunner for NoDb client from File
instead of from DB.
|
protected void |
optimizedUpdate()
Update Runner using special PreparedStatement
|
static int |
purgeLogPrepareStatement(DbSession session,
String startid,
String stopid,
Timestamp start,
Timestamp stop,
String rule,
String req,
boolean pending,
boolean transfer,
boolean error,
boolean done,
boolean all) |
static int |
purgeLogPrepareStatement(DbSession session,
Timestamp start,
Timestamp stop)
purge in same interval all runners with globallaststep as ALLDONETASK or
UpdatedInfo as Done
|
boolean |
ready() |
static void |
removeNoDbSpecialId(long specialId)
To allow to remove specifically one SpecialId from MemoryHashmap
|
boolean |
reset()
Reset the runner (ready to be run again)
|
static void |
resetToSubmit(DbSession session)
Change RUNNING, INTERRUPTED to TOSUBMIT TaskRunner from database.
|
boolean |
restart(boolean submit)
Make this Runner ready for restart
|
void |
restartRank()
Decrease if necessary the rank
|
void |
run()
Run all task from current status (globalstep and step)
|
void |
saveStatus()
This method is to be called each time an operation is happening on Runner
|
void |
select()
Select object from table
|
void |
setAllDone()
Set the global step as finished (after post task in success)
|
void |
setBlocksize(int blocksize) |
void |
setErrorExecutionStatus(ErrorCode code)
Set the ErrorCode for the InfoStatus
|
void |
setErrorTask()
Set the Error Task step
|
void |
setExecutionStatus(ErrorCode status)
Change the status from Task Execution
|
void |
setFileInformation(String newFileInformation)
Set a new File information for this transfer
|
void |
setFileMoved(String newFilename,
boolean isFileMoved) |
void |
setFilename(String filename) |
void |
setFrom(DbTaskRunner runner)
Partial set from another runner (infostatus, rank, status, step, stop,
filename, globallastep, globalstep,
isFileMoved)
|
void |
setFromJson(com.fasterxml.jackson.databind.node.ObjectNode source,
boolean ignorePrimaryKey)
Set the values from the Json node to the current object (no database
access)
|
protected void |
setFromJson(String field,
com.fasterxml.jackson.databind.JsonNode value) |
void |
setInitialTask()
Set the Initial Task step (before Pre task)
|
void |
setLocalChannelReference(LocalChannelReference localChannelReference)
Set a localChannelReference
|
void |
setOriginalFilename(String originalFilename) |
void |
setOriginalSize(long originalSize) |
void |
setPostTask()
Set the Post Task step
|
void |
setPreTask()
Set Pre Task step
|
void |
setRankAtStartup(int rank)
To set the rank at startup of the request if the request specify a
specific
rank
|
void |
setRescheduledTransfer()
Set this DbTaskRunner as rescheduled (valid only while still in memory)
|
void |
setSender(boolean sender)
Utility for "self request" mode only
|
void |
setSenderByRequestToValidate(boolean requestToValidate)
Utility for "self request"
|
void |
setStart(Timestamp start) |
void |
setStop(Timestamp stop) |
void |
setTransferMap(Map<String,Object> map) |
void |
setTransferTask(int rank)
Set Transfer rank
|
boolean |
shallIgnoreSave() |
boolean |
specialSubmit()
Special method used to force insert in case of SelfSubmit
|
boolean |
stopOrCancelRunner(ErrorCode code)
Stop or Cancel a Runner from database point of view
|
String |
toHtml(R66Session session,
String running) |
String |
toLogRunStep() |
String |
toShortNoHtmlString(String newline) |
String |
toShortString() |
String |
toSpecializedHtml(R66Session session,
String body,
String running) |
String |
toString() |
void |
update()
Update object to table
|
static void |
updateLruCacheTimeout(long ttl)
To update the TTL for the cache (to 10xTIMEOUT)
|
static void |
updateUsed(long specialId)
To update the usage TTL of the associated object
|
static NbAndSpecialId |
writeXML(DbPreparedStatement preparedStatement,
org.dom4j.io.XMLWriter xmlWriter)
Write the selected TaskRunners from PrepareStatement to a XMLWriter
|
void |
writeXmlWorkNoDb()
Method to write the current DbTaskRunner for NoDb client instead of
updating DB.
|
static NbAndSpecialId |
writeXMLWriter(DbPreparedStatement preparedStatement,
String filename)
Write selected TaskRunners to an XML file using an XMLWriter
|
static void |
writeXMLWriter(String filename)
Write all TaskRunners to an XML file using an XMLWriter
|
asJson, delete, getInsertAllValues, getSelectAllFields, getUpdateAllFields, getValues, getWherePrimaryKey, insert, setFromArray, setPrimaryKey, setToArray, toJson
get, getAllFields, getTrueValue, getValue, setTrueValue, setValue, setValues
public static final String JSON_ORIGINALSIZE
public static final String JSON_THROUGHMODE
public static final String JSON_RESCHEDULE
public static final int[] dbTypes
public static final String table
public static final String fieldseq
public static final DbTaskRunner.Columns[] indexes
public static final String XMLRUNNERS
public static final String XMLRUNNER
public static final String XMLEXTENSION
public static final int NBPRKEY
protected static final String selectAllFields
protected static final String updateAllFields
protected static final String insertAllValues
public DbTaskRunner(Transfer transfer)
public DbTaskRunner(DbRule rule, boolean isSender, RequestPacket requestPacket, String requested, Timestamp startTime) throws WaarpDatabaseException
rule
- isSender
- requestPacket
- requested
- startTime
- WaarpDatabaseException
public DbTaskRunner(R66Session session, DbRule rule, boolean isSender, RequestPacket requestPacket) throws WaarpDatabaseException
session
- rule
- isSender
- requestPacket
- WaarpDatabaseException
public DbTaskRunner(R66Session session, DbRule rule, long id, String requester, String requested) throws WaarpDatabaseException
session
- rule
- id
- requester
- requested
- WaarpDatabaseException
public DbTaskRunner(long id, String requester, String requested) throws WaarpDatabaseException
id
- requester
- requested
- WaarpDatabaseException
public DbTaskRunner(long id, String requester, String requested, String owner) throws WaarpDatabaseException
id
- requester
- requested
- WaarpDatabaseException
public DbTaskRunner(com.fasterxml.jackson.databind.node.ObjectNode source) throws WaarpDatabaseException
source
- WaarpDatabaseException
public DbTaskRunner(long id, String requested) throws WaarpDatabaseException
This object cannot be used except to retrieve information.
id
- requested
- WaarpDatabaseException
public static void createLruCache(int limit, long ttl)
limit
- limit of number of entries in the cachettl
- time to leave usedpublic static String hashStatus()
public static int clearCache()
public static void updateLruCacheTimeout(long ttl)
ttl
- protected void initObject()
AbstractDbData
initObject
in class AbstractDbDataDao<Transfer>
protected String getTable()
getTable
in class AbstractDbDataDao<Transfer>
protected AbstractDAO<Transfer> getDao() throws DAOConnectionException
getDao
in class AbstractDbDataDao<Transfer>
DAOConnectionException
protected String getPrimaryKey()
getPrimaryKey
in class AbstractDbDataDao<Transfer>
protected String getPrimaryField()
getPrimaryField
in class AbstractDbDataDao<Transfer>
public static String getRequested(R66Session session, RequestPacket requestPacket)
session
- requestPacket
- public static String getRequester(R66Session session, RequestPacket requestPacket)
session
- requestPacket
- public void checkThroughMode()
public void setFromJson(com.fasterxml.jackson.databind.node.ObjectNode source, boolean ignorePrimaryKey) throws WaarpDatabaseSqlException
AbstractDbDataDao
setFromJson
in class AbstractDbDataDao<Transfer>
ignorePrimaryKey
- True will ignore primaryKey from JsonWaarpDatabaseSqlException
public static final void removeNoDbSpecialId(long specialId)
specialId
- public static final void updateUsed(long specialId)
specialId
- public void create() throws WaarpDatabaseException
WaarpDatabaseException
public boolean exist() throws WaarpDatabaseException
AbstractDbDataDao
exist
in class AbstractDbDataDao<Transfer>
WaarpDatabaseException
public boolean checkFromDbForSubmit() throws WaarpDatabaseException
WaarpDatabaseException
public void select() throws WaarpDatabaseException
AbstractDbDataDao
select
in class AbstractDbDataDao<Transfer>
WaarpDatabaseException
public void update() throws WaarpDatabaseException
AbstractDbDataDao
update
in class AbstractDbDataDao<Transfer>
WaarpDatabaseException
protected void optimizedUpdate() throws WaarpDatabaseException
WaarpDatabaseException
public void clean()
public boolean specialSubmit() throws WaarpDatabaseException
WaarpDatabaseException
public void setFrom(DbTaskRunner runner)
runner
- public boolean isRecvThrough()
public boolean isSendThrough()
public void setLocalChannelReference(LocalChannelReference localChannelReference)
localChannelReference
- public LocalChannelReference getLocalChannelReference()
public static DbTaskRunner getFromStatement(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbTaskRunner getFromStatementNoRule(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
This version tries to load DbRule but will not make any error if not found!
preparedStatement
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbTaskRunner getFromStatementNoDbRule(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getFilterPrepareStatement(DbSession session, int limit, boolean orderBySpecialId, String startid, String stopid, Timestamp start, Timestamp stop, String rule, String req, boolean pending, boolean transfer, boolean error, boolean done, boolean all) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- limit
- orderBySpecialId
- startid
- stopid
- start
- stop
- rule
- req
- pending
- transfer
- error
- done
- all
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getFilterPrepareStatement(DbSession session, int limit, boolean orderBySpecialId, String startid, String stopid, Timestamp start, Timestamp stop, String rule, String req, boolean pending, boolean transfer, boolean error, boolean done, boolean all, String owner) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- limit
- orderBySpecialId
- startid
- stopid
- start
- stop
- rule
- req
- pending
- transfer
- error
- done
- all
- owner
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbTaskRunner[] getSelectFromInfoPrepareStatement(AbstractDbData.UpdatedInfo info, boolean orderByStart, int limit) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
info
- orderByStart
- If true, sort on Start ; If false, does not
set the
limit on startlimit
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountInfoPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(DbPreparedStatement pstt, AbstractDbData.UpdatedInfo info, long time)
pstt
- info
- time
- public static DbPreparedStatement getCountStepPrepareStatement(DbSession session, DbTaskRunner.TASKSTEP globalstep) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- globalstep
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountStatusPrepareStatement(DbSession session) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(DbPreparedStatement pstt, ErrorCode error, long time)
pstt
- error
- time
- public static DbPreparedStatement getCountStatusRunningPrepareStatement(DbSession session, ErrorCode status) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- status
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountInOutErrorPrepareStatement(DbSession session, boolean in) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- in
- True for Incoming, False for OutgoingWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getCountInOutRunningPrepareStatement(DbSession session, boolean in, boolean running) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- in
- True for Incoming, False for Outgoingrunning
- True for Running only, False for allWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static long getResultCountPrepareStatement(DbPreparedStatement pstt)
pstt
- public static void finishSelectOrCountPrepareStatement(DbPreparedStatement pstt, long time) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
pstt
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getLogPrepareStatement(DbSession session, Timestamp start, Timestamp stop) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- start
- stop
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static int purgeLogPrepareStatement(DbSession session, Timestamp start, Timestamp stop) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- start
- stop
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static int purgeLogPrepareStatement(DbSession session, String startid, String stopid, Timestamp start, Timestamp stop, String rule, String req, boolean pending, boolean transfer, boolean error, boolean done, boolean all) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- startid
- stopid
- start
- stop
- rule
- req
- pending
- transfer
- error
- done
- all
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static void resetToSubmit(DbSession session) throws WaarpDatabaseNoConnectionException
session
- WaarpDatabaseNoConnectionException
public static void changeFinishedToDone() throws WaarpDatabaseNoConnectionException
public boolean reset()
public void restartRank()
public boolean restart(boolean submit)
submit
- True to resubmit this task, else False to keep it
as
running (only reset)public boolean stopOrCancelRunner(ErrorCode code)
code
- public void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDao
changeUpdatedInfo
in class AbstractDbDataDao<Transfer>
public void setErrorExecutionStatus(ErrorCode code)
code
- public AbstractDbData.UpdatedInfo getUpdatedInfo()
public ErrorCode getErrorInfo()
public int getStep()
public boolean isRescheduledTransfer()
public void setRescheduledTransfer()
public void setRankAtStartup(int rank)
rank
- the rank to setpublic void setBlocksize(int blocksize)
blocksize
- the block size to setpublic void setFilename(String filename)
filename
- the filename to setpublic void setFileMoved(String newFilename, boolean isFileMoved)
newFilename
- the new Filename to setisFileMoved
- the isFileMoved to setpublic void setOriginalFilename(String originalFilename)
originalFilename
- the originalFilename to setpublic int getRank()
public void setExecutionStatus(ErrorCode status)
status
- public ErrorCode getStatus()
public boolean isSender()
public boolean isFileMoved()
public int getBlocksize()
public String getFilename()
public String getOriginalFilename()
public String getFileInformation()
public Map<String,Object> getTransferMap()
public void setTransferMap(Map<String,Object> map)
map
- the Map to set as XML string to transferInformationpublic void addToTransferMap(String key, Object value)
key
- value
- public Object getFromTransferMap(String key)
key
- public void setFileInformation(String newFileInformation)
newFileInformation
- public String getTransferInfo()
public long getSpecialId()
public DbRule getRule()
public String getRuleId()
public int getMode()
public DbTaskRunner.TASKSTEP getGlobalStep()
public DbTaskRunner.TASKSTEP getLastGlobalStep()
public int getGloballaststep()
public boolean ready()
public boolean isInTransfer()
public boolean isFinished()
public boolean isInError()
public boolean isAllDone()
public boolean isPreTaskStarting()
public void setInitialTask()
public void setPreTask()
public void setTransferTask(int rank)
rank
- public void setPostTask()
public void setErrorTask()
public void setAllDone()
public int finishTransferTask(ErrorCode code)
code
- TransferOk if successpublic boolean continueTransfer()
public final AbstractTask getTask(String[] task, R66Session tempSession) throws OpenR66RunnerErrorException
task
- tempSession
- OpenR66RunnerErrorException
public void run() throws OpenR66RunnerErrorException
OpenR66RunnerErrorException
public void finalizeTransfer(LocalChannelReference localChannelReference, R66File file, R66Result finalValue, boolean status) throws OpenR66RunnerErrorException, OpenR66ProtocolSystemException
localChannelReference
- file
- finalValue
- status
- OpenR66RunnerErrorException
OpenR66ProtocolSystemException
public void incrementRank()
public void saveStatus() throws OpenR66RunnerErrorException
OpenR66RunnerErrorException
public boolean forceSaveStatus()
OpenR66RunnerErrorException
public void clear()
public void deleteTempFile()
public String toLogRunStep()
public String toShortString()
public static String headerHtml()
public long freespaceMB(R66Session session)
session
- public long freespace(R66Session session, boolean isWorkingPath)
session
- isWorkingPath
- public String toHtml(R66Session session, String running)
session
- running
- special infopublic String toSpecializedHtml(R66Session session, String body, String running)
session
- body
- running
- special infopublic boolean isSelfRequested()
public boolean shallIgnoreSave()
public boolean isSelfRequest()
public String getRequested()
public String getRequester()
public Timestamp getStart()
public void setStart(Timestamp start)
start
- new Start time to apply when reschedulepublic Timestamp getStop()
public void setStop(Timestamp stop)
public RequestPacket getRequest()
public String getKey()
public static NbAndSpecialId writeXML(DbPreparedStatement preparedStatement, org.dom4j.io.XMLWriter xmlWriter) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException, OpenR66ProtocolBusinessException
preparedStatement
- ready to be executedxmlWriter
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
OpenR66ProtocolBusinessException
public static String getJson(DbPreparedStatement preparedStatement, int limit) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException, OpenR66ProtocolBusinessException
preparedStatement
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
OpenR66ProtocolBusinessException
public static NbAndSpecialId writeXMLWriter(DbPreparedStatement preparedStatement, String filename) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException, OpenR66ProtocolBusinessException
preparedStatement
- filename
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
OpenR66ProtocolBusinessException
public static void writeXMLWriter(String filename) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException, OpenR66ProtocolBusinessException
filename
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
OpenR66ProtocolBusinessException
public String backendXmlFilename()
public String asXML() throws OpenR66ProtocolBusinessException
OpenR66ProtocolBusinessException
public com.fasterxml.jackson.databind.node.ObjectNode getJson()
AbstractDbDataDao
getJson
in class AbstractDbDataDao<Transfer>
protected void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value)
setFromJson
in class AbstractDbDataDao<Transfer>
public String getJsonAsString()
public static DbTaskRunner fromStringXml(String xml, boolean reverse) throws OpenR66ProtocolBusinessException
xml
- reverse
- OpenR66ProtocolBusinessException
public void writeXmlWorkNoDb() throws OpenR66ProtocolBusinessException
OpenR66ProtocolBusinessException
public void loadXmlWorkNoDb() throws OpenR66ProtocolBusinessException
OpenR66ProtocolBusinessException
public static void loadXml(File logsFile) throws OpenR66ProtocolBusinessException
logsFile
- File containing logs from export functionOpenR66ProtocolBusinessException
public boolean existXmlWorkNoDb()
public void deleteXmlWorkNoDb()
public void setSender(boolean sender)
sender
- public static boolean getSenderByRequestPacket(RequestPacket request)
request
- public void setSenderByRequestToValidate(boolean requestToValidate)
requestToValidate
- public long getOriginalSize()
public void setOriginalSize(long originalSize)
originalSize
- the originalSize to setpublic String getFullFilePath() throws CommandAbstractException
CommandAbstractException
Copyright © 2009–2020 Waarp. All rights reserved.