A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
StandardResourceInfo.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* *
3
* Copyright 2018 Rice University *
4
* *
5
* Licensed under the Apache License, Version 2.0 (the "License"); *
6
* you may not use this file except in compliance with the License. *
7
* You may obtain a copy of the License at *
8
* *
9
* http://www.apache.org/licenses/LICENSE-2.0 *
10
* *
11
* Unless required by applicable law or agreed to in writing, software *
12
* distributed under the License is distributed on an "AS IS" BASIS, *
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14
* See the License for the specific language governing permissions and *
15
* limitations under the License. *
16
* *
17
*****************************************************************************/
18
19
#ifndef STANDARD_RESOURCE_INFO_H
20
#define STANDARD_RESOURCE_INFO_H
21
22
#include <memory>
23
namespace
pdb {
24
25
class
StandardResourceInfo
;
26
typedef
std::shared_ptr<StandardResourceInfo>
StandardResourceInfoPtr
;
27
28
32
class
StandardResourceInfo
{
33
34
public
:
35
StandardResourceInfo
() {}
36
37
~StandardResourceInfo
() {}
38
39
StandardResourceInfo
(
int
numCores
,
int
memSize
, std::string
address
,
int
port
,
int
nodeId
)
40
: numCores(numCores), memSize(memSize), address(address), port(port), nodeId(nodeId) {}
41
42
// To get number of CPUs in this resource
43
// <=0 for unknown
44
int
getNumCores
() {
45
return
this->
numCores
;
46
}
47
// <=0 for unknown
48
void
setNumCores
(
int
numCores
) {
49
this->numCores =
numCores
;
50
}
51
52
// To get size of memory in this resource
53
// <= 0 for unknown
54
int
getMemSize
() {
55
return
this->
memSize
;
56
}
57
// <= 0 for unknown
58
void
setMemSize
(
int
memSize
) {
59
this->memSize =
memSize
;
60
}
61
62
63
std::string&
getAddress
() {
64
return
address
;
65
}
66
67
void
setAddress
(std::string&
address
) {
68
this->address =
address
;
69
}
70
71
NodeID
getNodeId
() {
72
return
this->
nodeId
;
73
}
74
75
void
setNodeId
(
NodeID
nodeId
) {
76
this->nodeId =
nodeId
;
77
}
78
79
int
getPort
() {
80
81
return
port
;
82
}
83
84
void
setPort
(
int
port
) {
85
86
this->port =
port
;
87
}
88
89
90
private
:
91
// number of CPU cores
92
int
numCores
;
93
94
// size of memory in MB
95
int
memSize
;
96
97
// hostname or IP address of the PDB server
98
std::string
address
;
99
100
// port of the PDB server
101
int
port
;
102
103
// NodeID of the PDB server
104
NodeID
nodeId
;
105
};
106
}
107
108
#endif
pdb::StandardResourceInfo::~StandardResourceInfo
~StandardResourceInfo()
Definition:
StandardResourceInfo.h:37
pdb::StandardResourceInfo::numCores
int numCores
Definition:
StandardResourceInfo.h:92
pdb::StandardResourceInfo::setMemSize
void setMemSize(int memSize)
Definition:
StandardResourceInfo.h:58
pdb::StandardResourceInfo::setNodeId
void setNodeId(NodeID nodeId)
Definition:
StandardResourceInfo.h:75
pdb::StandardResourceInfo
Definition:
StandardResourceInfo.h:32
NodeID
unsigned int NodeID
Definition:
DataTypes.h:27
pdb::StandardResourceInfo::getNodeId
NodeID getNodeId()
Definition:
StandardResourceInfo.h:71
pdb::StandardResourceInfo::setPort
void setPort(int port)
Definition:
StandardResourceInfo.h:84
pdb::StandardResourceInfoPtr
std::shared_ptr< StandardResourceInfo > StandardResourceInfoPtr
Definition:
StandardResourceInfo.h:25
pdb::StandardResourceInfo::memSize
int memSize
Definition:
StandardResourceInfo.h:95
pdb::StandardResourceInfo::nodeId
NodeID nodeId
Definition:
StandardResourceInfo.h:104
pdb::StandardResourceInfo::getMemSize
int getMemSize()
Definition:
StandardResourceInfo.h:54
pdb::StandardResourceInfo::StandardResourceInfo
StandardResourceInfo(int numCores, int memSize, std::string address, int port, int nodeId)
Definition:
StandardResourceInfo.h:39
pdb::StandardResourceInfo::setNumCores
void setNumCores(int numCores)
Definition:
StandardResourceInfo.h:48
pdb::StandardResourceInfo::port
int port
Definition:
StandardResourceInfo.h:101
pdb::StandardResourceInfo::address
std::string address
Definition:
StandardResourceInfo.h:98
pdb::StandardResourceInfo::getAddress
std::string & getAddress()
Definition:
StandardResourceInfo.h:63
pdb::StandardResourceInfo::getPort
int getPort()
Definition:
StandardResourceInfo.h:79
pdb::StandardResourceInfo::setAddress
void setAddress(std::string &address)
Definition:
StandardResourceInfo.h:67
pdb::StandardResourceInfo::getNumCores
int getNumCores()
Definition:
StandardResourceInfo.h:44
pdb::StandardResourceInfo::StandardResourceInfo
StandardResourceInfo()
Definition:
StandardResourceInfo.h:35
plinycompute
pdb
src
queryExecution
headers
StandardResourceInfo.h
Generated on Mon Jun 18 2018 18:10:36 by
1.8.6