ArchiveRoute.hpp 2.33 KB
Newer Older
1
2
#pragma once

3
#include "cta/UserIdentity.hpp"
4
5
6
7
8
9
10
11

#include <stdint.h>
#include <string>
#include <time.h>

namespace cta {

/**
Steven Murray's avatar
Steven Murray committed
12
 * An archive route.
13
 */
Steven Murray's avatar
Steven Murray committed
14
class ArchiveRoute {
15
16
17
18
19
public:

  /**
   * Constructor.
   */
Steven Murray's avatar
Steven Murray committed
20
  ArchiveRoute();
21
22
23
24
25
26

  /**
   * Constructor.
   *
   * @param storageClassName The name of the storage class that identifies the
   * source disk files.
27
   * @param copyNb The tape copy number.  Copy numbers start from 1.
28
29
30
31
   * @param tapePoolName The name of the destination tape pool.
   * @param creator The identity of the user that created the storage class.
   * @param comment Comment describing the storage class.
   */
Steven Murray's avatar
Steven Murray committed
32
  ArchiveRoute(
33
    const std::string &storageClassName,
34
    const uint16_t copyNb,
35
36
    const std::string &tapePoolName,
    const UserIdentity &creator,
Daniele Kruse's avatar
Daniele Kruse committed
37
    const time_t creationTime,
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
    const std::string &comment);

  /**
   * Returns the name of the storage class that identifies the source disk
   * files.
   *
   * @return The name of the storage class that identifies the source disk
   * files.
   */
  const std::string &getStorageClassName() const throw();

  /**
   * Returns the tape copy number.
   *
   * @return The tape copy number.
   */
54
  uint16_t getCopyNb() const throw();
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

  /**
   * Returns the name of the destination tape pool.
   *
   * @return The name of the destination tape pool.
   */
  const std::string &getTapePoolName() const throw();

  /**
   * Returns the identity of the user that created the storage class.
   *
   * @return The identity of the user that created the storage class.
   */
  const UserIdentity &getCreator() const throw();

  /**
   * Returns the comment describing the storage class.
   *
   * @return The comment describing the storage class.
   */
  const std::string &getComment() const throw();

private:

  /**
   * The name of the storage class that identifies the source disk files.
   */
  std::string m_storageClassName;

  /**
   * The tape copy number.
   */
  uint32_t m_copyNb;

  /**
   * The name of the destination tape pool.
   */
  std::string m_tapePoolName;

  /**
   * The time when the storage class was created.
   */
  time_t m_creationTime;

  /**
   * The identity of the user that created the storage class.
   */
  UserIdentity m_creator;

  /**
   * Comment describing the storage class.
   */
  std::string m_comment;

Steven Murray's avatar
Steven Murray committed
109
}; // class ArchiveRoute
110
111

} // namespace cta