BusBoy
2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
cpp
api
dataset
Dataset.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_DATASET_H__
18
#define __BUSBOY_DATASET_H__
19
20
#include <map>
21
#include <memory>
22
23
#include "
DataFile.h
"
24
#include "
DatasetContext.h
"
25
#include "
keys/keys_api.h
"
26
#include "
metadata/metadata_api.h
"
27
28
namespace
BUSBOY {
29
30
31
class
DatasetImpl;
32
45
class
Dataset
{
46
47
public
:
48
49
Dataset
();
50
51
DataFile
*
getDataFile
(
const
DataKey
& key)
const
;
52
53
58
RandomAccessFile
*
getDataFileForRandomAccess
(
const
DataKey
& key)
const
;
59
69
void
addDataFile
(
const
DataKey
& key,
DataFile
* file);
70
78
WritableRandomAccessFile
*
addDataFileForRandomAccess
(
const
DataKey
& key,
DataFile
* file);
79
80
bool
hasDataFile
(
const
DataKey
& key)
const
;
81
82
std::set<DataKey>
getAllFileKeys
()
const
;
83
84
MetadataMap
*
getMetadata
(
const
DataKey
& key)
const
;
85
93
void
addMetadata
(
const
DataKey
& key,
MetadataMap
* meta);
94
95
bool
hasMetadata
(
const
DataKey
& key)
const
;
96
97
std::set<DataKey>
getAllMetadataKeys
()
const
;
98
99
void
release
();
100
104
void
setContext
(
DatasetContext
* context);
105
109
void
setGlobalKeyspace
(
const
Keyspace
& keyspace);
110
115
std::string
getDataFileName
(
const
DataKey
& key)
const
;
116
117
123
const
Keyspace
&
getKeyspace
()
const
;
124
130
const
Keyspace
&
getFilesKeyspace
()
const
;
131
137
const
Keyspace
&
getMetadataKeyspace
()
const
;
138
142
void
generateKeyspaces
();
143
144
bool
isQueryOnly
();
145
146
bool
operator==
(
const
Dataset
& dataset)
const
;
147
148
bool
operator!=
(
const
Dataset
& dataset)
const
;
149
150
~Dataset
();
151
152
static
void
copySourceToSink
(std::shared_ptr<DataFileSource> src,
DataFileSink
* sink);
153
154
private
:
155
156
DatasetImpl
* m_impl;
157
158
// prevent calling these
159
Dataset
(
const
Dataset
& dataset);
160
Dataset
& operator=(
const
Dataset
& dataset);
161
162
};
163
164
}
165
#endif
166
167
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.