org.gcube.datatransfer.scheduler.db
Class DataTransferDBManager

java.lang.Object
  extended by org.gcube.datatransfer.scheduler.db.DBManager
      extended by org.gcube.datatransfer.scheduler.db.DataTransferDBManager
All Implemented Interfaces:
Runnable

public class DataTransferDBManager
extends DBManager
implements Runnable


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.datatransfer.scheduler.db.DBManager
DBManager.BaseConsumer
 
Field Summary
 
Fields inherited from class org.gcube.datatransfer.scheduler.db.DBManager
backupFolder, backupIntervalMS, dbFileBaseFolder, dbFileName, dbName, persistenceFactory, prop
 
Constructor Summary
DataTransferDBManager()
           
DataTransferDBManager(String dbConfigurationFileName, String persistenceRootPath, String propertyConfig)
           
 
Method Summary
 void deleteAgent(Agent agent)
           
 void deleteTransfer(Transfer transfer)
           
 void deleteTransferObject(Set<TransferObject> transferObjects)
           
 javax.jdo.PersistenceManager getPersistenceManager()
           
 void resetProgressInTransfer(String transferId)
           
 void run()
          (non-Javadoc)
 void storeAgent(Agent agent)
           
 void storeAgentStatistics(AgentStatistics agentStatistics)
           
 void storeManuallyScheduled(ManuallyScheduled manuallyScheduled)
           
 void storePeriodicallyScheduled(PeriodicallyScheduled periodicallyScheduled)
           
 void storeSource(DataSource source)
           
 void storeStorage(DataStorage storage)
           
 void storeTransfer(Transfer transfer)
           
 void storeTransferObject(Set<TransferObject> transferObjects)
           
 void storeTransferOutcomes(TransferOutcome transferOutcome)
           
 void storeTypeOfSchedule(TypeOfSchedule typeOfSchedule)
           
 void updateAgentInTransfer(String transferId, String agentid)
           
 void updateAgentStatistics(String id, int ongoing, int failed, int succeeded, int canceled, int total)
           
 void updateEverythingInAgent(String agentId, String agentIdOfIs, String host, int port)
           
 void updateEverythingInSource(String sourceId, String dataSourceIdOfIS, String dataSourceName, String description, String endpoint, String username, String pass, String folder)
           
 void updateEverythingInStorage(String id, String idOfIS, String dataStorageName, String description, String endpoint, String username, String pass)
           
 void updateObjectFailedIDs(String transferId, String[] objectFailedIDs)
           
 void updateObjectTrasferredIDs(String transferId, String[] objectTrasferredIDs)
           
 void updateOutcomesInTransfer(String transferId, List<String> outcomes)
           
 void updateSourceInTransfer(String transferId, String sourceid)
           
 void updateStartTimeInTransfer(String transferId, long startTime)
           
 void updateStorageInTransfer(String transferId, String storageid)
           
 void updateTotalTimeInTransfer(String transferId, long totalTime)
           
 void updateTransferBytes(String transferId, long total_size, long transferredBytes)
           
 void updateTransferError(String transferId, List<String> errors)
           
 void updateTransferIdOfAgentInTransfer(String transferId, String transferIdOfAgent)
           
 void updateTransferReadyObjects(String transferId, boolean flag)
           
 void updateTransferStartInstanceString(String transferId, String startInstanceString)
           
 void updateTransferStatus(String transferId, String status)
           
 void updateTreeOutcomeInTransfer(String transferId, String exception, int totalReadTrees, int totalWrittenTrees)
           
 
Methods inherited from class org.gcube.datatransfer.scheduler.db.DBManager
close, getScheduledBackupInHours, startBackUp, zipFolder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTransferDBManager

public DataTransferDBManager(String dbConfigurationFileName,
                             String persistenceRootPath,
                             String propertyConfig)

DataTransferDBManager

public DataTransferDBManager()
Method Detail

storeTransfer

public void storeTransfer(Transfer transfer)
                   throws Exception
Throws:
Exception

storeTransferObject

public void storeTransferObject(Set<TransferObject> transferObjects)
                         throws Exception
Throws:
Exception

storeTypeOfSchedule

public void storeTypeOfSchedule(TypeOfSchedule typeOfSchedule)
                         throws Exception
Throws:
Exception

storePeriodicallyScheduled

public void storePeriodicallyScheduled(PeriodicallyScheduled periodicallyScheduled)
                                throws Exception
Throws:
Exception

storeManuallyScheduled

public void storeManuallyScheduled(ManuallyScheduled manuallyScheduled)
                            throws Exception
Throws:
Exception

storeAgent

public void storeAgent(Agent agent)
                throws Exception
Throws:
Exception

storeSource

public void storeSource(DataSource source)
                 throws Exception
Throws:
Exception

storeStorage

public void storeStorage(DataStorage storage)
                  throws Exception
Throws:
Exception

storeAgentStatistics

public void storeAgentStatistics(AgentStatistics agentStatistics)
                          throws Exception
Throws:
Exception

storeTransferOutcomes

public void storeTransferOutcomes(TransferOutcome transferOutcome)
                           throws Exception
Throws:
Exception

deleteTransfer

public void deleteTransfer(Transfer transfer)
                    throws Exception
Throws:
Exception

deleteTransferObject

public void deleteTransferObject(Set<TransferObject> transferObjects)
                          throws Exception
Throws:
Exception

deleteAgent

public void deleteAgent(Agent agent)
                 throws Exception
Throws:
Exception

updateTransferStatus

public void updateTransferStatus(String transferId,
                                 String status)
                          throws Exception
Throws:
Exception

updateTransferBytes

public void updateTransferBytes(String transferId,
                                long total_size,
                                long transferredBytes)
                         throws Exception
Throws:
Exception

updateTreeOutcomeInTransfer

public void updateTreeOutcomeInTransfer(String transferId,
                                        String exception,
                                        int totalReadTrees,
                                        int totalWrittenTrees)
                                 throws Exception
Throws:
Exception

updateTransferError

public void updateTransferError(String transferId,
                                List<String> errors)
                         throws Exception
Throws:
Exception

updateObjectTrasferredIDs

public void updateObjectTrasferredIDs(String transferId,
                                      String[] objectTrasferredIDs)
                               throws Exception
Throws:
Exception

updateObjectFailedIDs

public void updateObjectFailedIDs(String transferId,
                                  String[] objectFailedIDs)
                           throws Exception
Throws:
Exception

updateAgentInTransfer

public void updateAgentInTransfer(String transferId,
                                  String agentid)
                           throws Exception
Throws:
Exception

updateStartTimeInTransfer

public void updateStartTimeInTransfer(String transferId,
                                      long startTime)
                               throws Exception
Throws:
Exception

updateTotalTimeInTransfer

public void updateTotalTimeInTransfer(String transferId,
                                      long totalTime)
                               throws Exception
Throws:
Exception

updateStorageInTransfer

public void updateStorageInTransfer(String transferId,
                                    String storageid)
                             throws Exception
Throws:
Exception

updateSourceInTransfer

public void updateSourceInTransfer(String transferId,
                                   String sourceid)
                            throws Exception
Throws:
Exception

updateTransferIdOfAgentInTransfer

public void updateTransferIdOfAgentInTransfer(String transferId,
                                              String transferIdOfAgent)
                                       throws Exception
Throws:
Exception

updateTransferStartInstanceString

public void updateTransferStartInstanceString(String transferId,
                                              String startInstanceString)
                                       throws Exception
Throws:
Exception

updateTransferReadyObjects

public void updateTransferReadyObjects(String transferId,
                                       boolean flag)
                                throws Exception
Throws:
Exception

updateOutcomesInTransfer

public void updateOutcomesInTransfer(String transferId,
                                     List<String> outcomes)
                              throws Exception
Throws:
Exception

updateEverythingInAgent

public void updateEverythingInAgent(String agentId,
                                    String agentIdOfIs,
                                    String host,
                                    int port)
                             throws Exception
Throws:
Exception

updateEverythingInSource

public void updateEverythingInSource(String sourceId,
                                     String dataSourceIdOfIS,
                                     String dataSourceName,
                                     String description,
                                     String endpoint,
                                     String username,
                                     String pass,
                                     String folder)
                              throws Exception
Throws:
Exception

updateEverythingInStorage

public void updateEverythingInStorage(String id,
                                      String idOfIS,
                                      String dataStorageName,
                                      String description,
                                      String endpoint,
                                      String username,
                                      String pass)
                               throws Exception
Throws:
Exception

updateAgentStatistics

public void updateAgentStatistics(String id,
                                  int ongoing,
                                  int failed,
                                  int succeeded,
                                  int canceled,
                                  int total)
                           throws Exception
Throws:
Exception

resetProgressInTransfer

public void resetProgressInTransfer(String transferId)
                             throws Exception
Throws:
Exception

run

public void run()
(non-Javadoc)

Specified by:
run in interface Runnable
See Also:
Runnable.run()

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager()


Copyright © 2014. All Rights Reserved.