ScaleOut C++ Native Client API
5.1
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
put_options.h
1
/*
2
Copyright (c) 2013 by ScaleOut Software, Inc.
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#pragma once
18
19
namespace
sosscli {
20
22
class
PutOptions
23
{
24
public
:
25
26
/* Constants */
27
30
const
static
PutOptions
CACHE_DEFAULTS
;
31
32
/* Constructors */
33
35
PutOptions
()
36
: use_client_cache_(true), throw_on_error_(true) {}
37
43
PutOptions
(
bool
use_client_cache
,
bool
throw_on_error
)
44
: use_client_cache_(use_client_cache), throw_on_error_(throw_on_error) {}
45
47
virtual
~PutOptions
() {};
48
49
/* Accessors */
50
53
bool
use_client_cache
()
const
{
return
use_client_cache_; }
58
PutOptions
&
set_use_client_cache
(
bool
use_client_cache
) { use_client_cache_ =
use_client_cache
;
return
*
this
; }
59
62
bool
throw_on_error
()
const
{
return
throw_on_error_; }
68
PutOptions
&
set_throw_on_error
(
bool
throw_on_error
) { throw_on_error_ =
throw_on_error
;
return
*
this
; }
69
70
protected
:
71
72
private
:
73
74
bool
use_client_cache_;
75
bool
throw_on_error_;
76
};
77
78
}
// namespace
© 2014
ScaleOut Software, Inc.