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
StoragePinPage.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  * StoragePinPage.h
20  *
21  * Created on: Feb 29, 2016
22  * Author: Jia
23  */
24 
25 #ifndef SRC_BUILTINPDBOBJECTS_HEADERS_PINPAGE_H_
26 #define SRC_BUILTINPDBOBJECTS_HEADERS_PINPAGE_H_
27 
28 #include "Object.h"
29 #include "DataTypes.h"
30 
31 // PRELOAD %StoragePinPage%
32 
33 namespace pdb {
34 // this object type is sent to the server to tell it to pin a page
35 class StoragePinPage : public pdb::Object {
36 
37 
38 public:
40 
42 
44  NodeID nodeId,
47  SetID setId,
48  PageID pageId)
49  : wasNewPage(wasNewPage),
50  nodeId(nodeId),
51  dbId(dbId),
52  userTypeId(userTypeId),
53  setId(setId),
54  pageId(pageId) {}
55 
56  //
57  bool getWasNewPage() {
58  return this->wasNewPage;
59  }
60 
62  this->wasNewPage = wasNewPage;
63  }
64 
66  return this->nodeId;
67  }
68 
70  this->nodeId = nodeId;
71  }
72 
74  return this->dbId;
75  }
76 
78  this->dbId = dbId;
79  }
80 
82  return this->userTypeId;
83  }
84 
85  void setUserTypeID(UserTypeID typeId) {
86  this->userTypeId = typeId;
87  }
88 
90  return this->setId;
91  }
92 
94  this->setId = setId;
95  }
96 
98  return this->pageId;
99  }
100 
102  this->pageId = pageId;
103  }
104 
106 
107 private:
114 };
115 }
116 
117 #endif /* SRC_BUILTINPDBOBJECTS_HEADERS_PINPAGE_H_ */
#define ENABLE_DEEP_COPY
Definition: DeepCopy.h:52
unsigned int SetID
Definition: DataTypes.h:31
void setNodeID(NodeID nodeId)
void setUserTypeID(UserTypeID typeId)
unsigned int NodeID
Definition: DataTypes.h:27
void setDatabaseID(DatabaseID dbId)
StoragePinPage(bool wasNewPage, NodeID nodeId, DatabaseID dbId, UserTypeID userTypeId, SetID setId, PageID pageId)
DatabaseID getDatabaseID()
unsigned int DatabaseID
Definition: DataTypes.h:29
unsigned int PageID
Definition: DataTypes.h:26
UserTypeID getUserTypeID()
void setPageID(PageID pageId)
void setWasNewPage(bool wasNewPage)
void setSetID(SetID setId)
unsigned int UserTypeID
Definition: DataTypes.h:25