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
CatalogStandardNodeMetadata.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
* CatalogStandardNodeMetadata.h
20
*
21
*/
22
23
#ifndef SRC_CATALOG_CATALOGSTANDARDNODEMETADATA_H_
24
#define SRC_CATALOG_CATALOGSTANDARDNODEMETADATA_H_
25
26
#include "
CatalogNodeMetadata.h
"
27
#include <iostream>
28
#include <string>
29
30
using namespace
std;
31
32
// This class serves to store information about a node in a cluster of PDB.
33
// It also provides methods for maintaining their associated metadata.
34
// Clients of this class will access this information using a handler to the
35
// catalog.
36
37
class
CatalogStandardNodeMetadata
{
38
public
:
39
CatalogStandardNodeMetadata
();
40
41
CatalogStandardNodeMetadata
(
string
nodeIdValue,
string
nodeIPValue,
42
int
nodePortValue,
string
nodeNameValue,
43
string
nodeTypeValue,
int
nodeStatusValue);
44
45
// Copy constructor
46
CatalogStandardNodeMetadata
(
const
CatalogStandardNodeMetadata
&pdbNodeToCopy);
47
48
~
CatalogStandardNodeMetadata
();
49
50
void
setValues(
string
nodeIdValue,
string
nodeIPValue,
int
nodePortValue,
51
string
nodeNameValue,
string
nodeTypeValue,
52
int
nodeStatusValue);
53
54
string
getItemKey();
55
56
string
getNodeIP();
57
58
string
getItemId();
59
60
string
getItemName();
61
62
string
getNodeType();
63
64
int
getNodePort();
65
66
int
getNodeStatus();
67
68
void
setItemKey(
string
&itemKeyIn);
69
70
void
setItemIP(
pdb::String
&itemIPIn);
71
72
void
setItemId(
string
&itemIdIn);
73
74
void
setItemName(
string
&itemNameIn);
75
76
void
setNodePort(
int
&portIn);
77
78
string
printShort();
79
80
void
toStandardMetadata(
pdb::Handle<pdb::CatalogNodeMetadata>
&convertedItem);
81
82
friend
std::ostream &
operator<<
(std::ostream &out,
83
CatalogStandardNodeMetadata
&node) {
84
out <<
"\nCluster Node Metadata"
<< endl;
85
out <<
"-------------------"
<< endl;
86
out <<
" Node Id: "
<< node.
getItemId
().c_str() << endl;
87
out <<
" Node IP: "
<< node.
getNodeIP
().c_str() << endl;
88
out <<
" Node Port: "
<< node.
getNodePort
() << endl;
89
out <<
" Node Name: "
<< node.
getItemName
().c_str() << endl;
90
out <<
" Node Type: "
<< node.
getNodeType
().c_str() << endl;
91
out <<
"-------------------\n"
<< endl;
92
return
out;
93
}
94
95
private
:
96
string
nodeId
;
97
string
nodeIP
;
98
int
nodePort
;
99
string
nodeName
;
100
string
nodeType
;
101
int
nodeStatus
;
102
string
nodeAddress
;
103
};
104
105
#endif
/* SRC_CATALOG_CATALOGSTANDARDNODEMETADATA_H_ */
CatalogStandardNodeMetadata::nodeAddress
string nodeAddress
Definition:
CatalogStandardNodeMetadata.h:102
CatalogStandardNodeMetadata::getItemName
string getItemName()
Definition:
CatalogStandardNodeMetadata.cc:73
CatalogStandardNodeMetadata::getNodeType
string getNodeType()
Definition:
CatalogStandardNodeMetadata.cc:75
CatalogNodeMetadata.h
CatalogStandardNodeMetadata::nodeIP
string nodeIP
Definition:
CatalogStandardNodeMetadata.h:97
CatalogStandardNodeMetadata::operator<<
friend std::ostream & operator<<(std::ostream &out, CatalogStandardNodeMetadata &node)
Definition:
CatalogStandardNodeMetadata.h:82
CatalogStandardNodeMetadata::getNodePort
int getNodePort()
Definition:
CatalogStandardNodeMetadata.cc:77
CatalogStandardNodeMetadata::getItemId
string getItemId()
Definition:
CatalogStandardNodeMetadata.cc:71
CatalogStandardNodeMetadata::nodeStatus
int nodeStatus
Definition:
CatalogStandardNodeMetadata.h:101
pdb::String
Definition:
PDBString.h:43
CatalogStandardNodeMetadata::getNodeIP
string getNodeIP()
Definition:
CatalogStandardNodeMetadata.cc:69
CatalogStandardNodeMetadata
Definition:
CatalogStandardNodeMetadata.h:37
CatalogStandardNodeMetadata::nodeType
string nodeType
Definition:
CatalogStandardNodeMetadata.h:100
CatalogStandardNodeMetadata::nodeId
string nodeId
Definition:
CatalogStandardNodeMetadata.h:96
CatalogStandardNodeMetadata::nodePort
int nodePort
Definition:
CatalogStandardNodeMetadata.h:98
pdb::Handle
Definition:
Allocator.h:399
CatalogStandardNodeMetadata::nodeName
string nodeName
Definition:
CatalogStandardNodeMetadata.h:99
plinycompute
pdb
src
catalog
headers
CatalogStandardNodeMetadata.h
Generated on Mon Jun 18 2018 18:10:35 by
1.8.6