Commit c7dc4c0b authored by Steven Murray's avatar Steven Murray
Browse files

The TapeMount class now has complete() and failed() methods just like the TapeJob class

parent 678e6390
...@@ -46,9 +46,16 @@ std::string cta::ArchiveMount::getVid() const throw() { ...@@ -46,9 +46,16 @@ std::string cta::ArchiveMount::getVid() const throw() {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// finish // complete
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void cta::ArchiveMount::finish() { void cta::ArchiveMount::complete() {
throw NotImplemented ("");
}
//------------------------------------------------------------------------------
// failed
//------------------------------------------------------------------------------
void cta::ArchiveMount::failed(const std::exception &ex) {
throw NotImplemented (""); throw NotImplemented ("");
} }
......
...@@ -64,10 +64,22 @@ namespace cta { ...@@ -64,10 +64,22 @@ namespace cta {
virtual std::string getVid() const throw(); virtual std::string getVid() const throw();
/** /**
* Notifies the scheduler that the session is finished * Indicates that the mount was successful.
*
* @param checksumOfTransfer The adler-32 checksum of the file as calculated
* during the execution of the job.
* @param fileSizeOfTransfer The size of the file as calculated during the
* execution of the job.
*/ */
virtual void finish(); virtual void complete();
/**
* Indicates that the mount failed.
*
* @param ex The reason for the failure.
*/
virtual void failed(const std::exception &ex);
/** /**
* Job factory * Job factory
* *
......
/* /*
* The CERN Tape Archive (CTA) project * The CERN Tape Retrieve (CTA) project
* Copyright (C) 2015 CERN * Copyright (C) 2015 CERN
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
...@@ -46,12 +46,19 @@ std::string cta::RetrieveMount::getVid() const throw() { ...@@ -46,12 +46,19 @@ std::string cta::RetrieveMount::getVid() const throw() {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// finish // complete
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void cta::RetrieveMount::finish() { void cta::RetrieveMount::complete() {
throw NotImplemented (""); throw NotImplemented ("");
} }
//------------------------------------------------------------------------------
// failed
//------------------------------------------------------------------------------
void cta::RetrieveMount::failed(const std::exception &ex) {
throw NotImplemented ("");
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// destructor // destructor
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -64,10 +64,22 @@ namespace cta { ...@@ -64,10 +64,22 @@ namespace cta {
virtual std::string getVid() const throw(); virtual std::string getVid() const throw();
/** /**
* Notifies the scheduler that the session is finished * Indicates that the mount was successful.
*
* @param checksumOfTransfer The adler-32 checksum of the file as calculated
* during the execution of the job.
* @param fileSizeOfTransfer The size of the file as calculated during the
* execution of the job.
*/ */
virtual void finish(); virtual void complete();
/**
* Indicates that the mount failed.
*
* @param ex The reason for the failure.
*/
virtual void failed(const std::exception &ex);
/** /**
* Job factory * Job factory
* *
......
...@@ -45,9 +45,21 @@ namespace cta { ...@@ -45,9 +45,21 @@ namespace cta {
virtual std::string getVid() const throw() = 0; virtual std::string getVid() const throw() = 0;
/** /**
* Notifies the scheduler that the session is finished * Indicates that the mount was successful.
*
* @param checksumOfTransfer The adler-32 checksum of the file as calculated
* during the execution of the job.
* @param fileSizeOfTransfer The size of the file as calculated during the
* execution of the job.
*/
virtual void complete() = 0;
/**
* Indicates that the mount failed.
*
* @param ex The reason for the failure.
*/ */
virtual void finish() = 0; virtual void failed(const std::exception &ex) = 0;
/** /**
* Destructor. * Destructor.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment