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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SetSpecifier.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 SET_SPECIFIER_H
20 #define SET_SPECIFIER_H
21 
22 // by Jia, Oct 2016
23 
24 #include <string>
25 #include "DataTypes.h"
26 #include "Configuration.h"
27 #include <memory>
29 typedef std::shared_ptr<SetSpecifier> SetSpecifierPtr;
30 
31 
32 // encapsulates a request to add a set in storage
33 class SetSpecifier {
34 
35 public:
38 
39  SetSpecifier(std::string dataBase,
40  std::string setName,
43  SetID setId,
44  size_t pageSize = DEFAULT_PAGE_SIZE)
45  : dataBase(dataBase),
46  setName(setName),
47  dbId(dbId),
48  typeId(typeId),
49  setId(setId),
50  pageSize(pageSize) {}
51 
52  std::string getDatabase() {
53  return dataBase;
54  }
55 
56  std::string getSetName() {
57  return setName;
58  }
59 
61  this->dbId = dbId;
62  }
63 
65  this->typeId = typeId;
66  }
67 
69  this->setId = setId;
70  }
71 
72  void setPageSize(size_t pageSize) {
73  this->pageSize = pageSize;
74  }
75 
77  return dbId;
78  }
79 
81  return typeId;
82  }
83 
85  return setId;
86  }
87 
88  size_t getPageSize() {
89  return pageSize;
90  }
91 
92 
93 private:
94  std::string dataBase;
95  std::string setName;
99  size_t pageSize;
100 };
101 
102 
103 #endif
unsigned int SetID
Definition: DataTypes.h:31
void setPageSize(size_t pageSize)
Definition: SetSpecifier.h:72
std::string getDatabase()
Definition: SetSpecifier.h:52
size_t getPageSize()
Definition: SetSpecifier.h:88
SetSpecifier(std::string dataBase, std::string setName, DatabaseID dbId, UserTypeID typeId, SetID setId, size_t pageSize=DEFAULT_PAGE_SIZE)
Definition: SetSpecifier.h:39
size_t pageSize
Definition: SetSpecifier.h:99
unsigned int DatabaseID
Definition: DataTypes.h:29
DatabaseID dbId
Definition: SetSpecifier.h:96
SetID getSetId()
Definition: SetSpecifier.h:84
std::string getSetName()
Definition: SetSpecifier.h:56
UserTypeID getTypeId()
Definition: SetSpecifier.h:80
void setTypeId(UserTypeID typeId)
Definition: SetSpecifier.h:64
UserTypeID typeId
Definition: SetSpecifier.h:97
std::string setName
Definition: SetSpecifier.h:95
std::string dataBase
Definition: SetSpecifier.h:94
DatabaseID getDatabaseId()
Definition: SetSpecifier.h:76
void setDatabaseId(DatabaseID dbId)
Definition: SetSpecifier.h:60
void setSetId(SetID setId)
Definition: SetSpecifier.h:68
#define DEFAULT_PAGE_SIZE
Definition: Configuration.h:36
std::shared_ptr< SetSpecifier > SetSpecifierPtr
Definition: SetSpecifier.h:28
unsigned int UserTypeID
Definition: DataTypes.h:25