Commit 4d8289ae authored by Steven Murray's avatar Steven Murray
Browse files

Moved tapeBlockIdToString() from utils to WorkerThread

parent ca861e5b
......@@ -1308,7 +1308,7 @@ void castor::tape::tapegateway::WorkerThread::logMigrationNotified (Cuuid_t uuid
castor::dlf::Param("checksum",checkSum.str()),
castor::dlf::Param("fileSize",fileMigrated.fileSize()),
castor::dlf::Param("compressedFileSize",fileMigrated.compressedFileSize()),
castor::dlf::Param("blockid", utils::tapeBlockIdToString(fileMigrated.blockId0(),
castor::dlf::Param("blockid", tapeBlockIdToString(fileMigrated.blockId0(),
fileMigrated.blockId1(), fileMigrated.blockId2(),
fileMigrated.blockId3())),
castor::dlf::Param("fileTransactionId",fileMigrated.fileTransactionId())
......@@ -1316,6 +1316,22 @@ void castor::tape::tapegateway::WorkerThread::logMigrationNotified (Cuuid_t uuid
castor::dlf::dlf_writep(uuid, DLF_LVL_DEBUG, WORKER_MIGRATION_NOTIFIED, paramsComplete, castorFileId);
}
std::string castor::tape::tapegateway::WorkerThread::tapeBlockIdToString(
const unsigned char blockId0,
const unsigned char blockId1,
const unsigned char blockId2,
const unsigned char blockId3) throw() {
std::ostringstream oss;
oss << std::hex << std::setfill('0') <<
std::setw(2) << (int)blockId0 <<
std::setw(2) << (int)blockId1 <<
std::setw(2) << (int)blockId2 <<
std::setw(2) << (int)blockId3;
return oss.str();
}
void castor::tape::tapegateway::WorkerThread::logMigrationBulkVmgrUpdate (Cuuid_t uuid,
const requesterInfo& requester, const FileMigrationReportList & fileMigrationReportList,
int filesCount, u_signed64 highestFseq, u_signed64 totalBytes,
......
......@@ -129,6 +129,20 @@ namespace tapegateway{
u_signed64 mountTransactionId, u_signed64 aggregatorTransactionId,
struct Cns_fileid* castorFileId,
const requesterInfo& requester, const FileMigratedNotificationStruct & fileMigrated);
/**
* Returns the string representation of the specified tape block-id.
*
* @param blockId0 Block-id part 0.
* @param blockId1 Block-id part 1.
* @param blockId2 Block-id part 2.
* @param blockId3 Block-id part 3.
* @return The string representation of the block-id.
*/
std::string tapeBlockIdToString(
const unsigned char blockId0,
const unsigned char blockId1,
const unsigned char blockId2,
const unsigned char blockId3) throw();
void logMigrationBulkVmgrUpdate (Cuuid_t uuid,
const requesterInfo& requester, const FileMigrationReportList & fileMigrationReportList,
int filesCount, u_signed64 highestFseq, u_signed64 totalBytes,
......
......@@ -130,22 +130,3 @@ unsigned short castor::tape::utils::getPortFromConfig(
return port;
}
//------------------------------------------------------------------------------
// tapeBlockIdToString
//------------------------------------------------------------------------------
std::string castor::tape::utils::tapeBlockIdToString(
const unsigned char blockId0,
const unsigned char blockId1,
const unsigned char blockId2,
const unsigned char blockId3) throw() {
std::ostringstream oss;
oss << std::hex << std::setfill('0') <<
std::setw(2) << (int)blockId0 <<
std::setw(2) << (int)blockId1 <<
std::setw(2) << (int)blockId2 <<
std::setw(2) << (int)blockId3;
return oss.str();
}
......@@ -81,21 +81,6 @@ unsigned short getPortFromConfig(const char *const category,
const char *const name, const unsigned short defaultPort)
throw(exception::InvalidConfigEntry, castor::exception::Exception);
/**
* Returns the string representation of the specified tape block-id.
*
* @param blockId0 Block-id part 0.
* @param blockId1 Block-id part 1.
* @param blockId2 Block-id part 2.
* @param blockId3 Block-id part 3.
* @return The string representation of the block-id.
*/
std::string tapeBlockIdToString(
const unsigned char blockId0,
const unsigned char blockId1,
const unsigned char blockId2,
const unsigned char blockId3) throw();
} // namespace utils
} // namespace tape
} // namespace castor
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