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
TempSet.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 
20 #ifndef TEMP_SET_H
21 #define TEMP_SET_H
22 
23 #include "DataTypes.h"
24 #include "PDBPage.h"
25 #include "UserSet.h"
26 #include "PageCircularBuffer.h"
27 
28 #include <memory>
29 using namespace std;
30 class TempSet;
31 typedef shared_ptr<TempSet> TempSetPtr;
32 
39 class TempSet : public UserSet {
40 public:
41  // typedef UserSet super;
42 
47  TempSet(SetID setId,
48  string setName,
49  string metaTempPath,
50  vector<string> dataTempPaths,
51  SharedMemPtr shm,
52  PageCachePtr cache,
53  pdb::PDBLoggerPtr logger,
54  LocalityType localityType = ShuffleData,
56  OperationType operation = Write,
57  DurabilityType durability = TryCache,
58  PersistenceType persistence = Transient,
59  size_t pageSize = DEFAULT_PAGE_SIZE);
60  ~TempSet();
61 
62  // TODO: virtual vector<PageIteratorPtr> * getIterators() override;
63 
64 
68  void clear();
69 
70 protected:
74  string encodePath(string tempPath, string setName);
75 };
76 
77 
78 #endif /* TEMP_SET_H */
shared_ptr< TempSet > TempSetPtr
Definition: TempSet.h:30
unsigned int SetID
Definition: DataTypes.h:31
OperationType
Definition: DataTypes.h:57
shared_ptr< PageCache > PageCachePtr
Definition: PageCache.h:39
LocalityType
Definition: DataTypes.h:50
DurabilityType
Definition: DataTypes.h:59
LocalitySetReplacementPolicy
Definition: DataTypes.h:52
shared_ptr< SharedMem > SharedMemPtr
Definition: SharedMem.h:32
Definition: DataTypes.h:52
PersistenceType
Definition: DataTypes.h:68
std::shared_ptr< PDBLogger > PDBLoggerPtr
Definition: PDBLogger.h:40
#define DEFAULT_PAGE_SIZE
Definition: Configuration.h:36