ScaleOut C++ Native Client API
5.1
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
pmicli_invoke_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
#include <stdint.h>
20
#include "soss_svccli.h"
21
22
namespace
sosscli {
23
25
class
PmicliInvokeOptions
26
{
27
public
:
28
29
/* Constants */
30
33
const
static
PmicliInvokeOptions
CACHE_DEFAULTS
;
34
35
/* Constructors */
36
38
PmicliInvokeOptions
()
39
: throw_on_error_(true), invoke_timeout_s_(SOSSLIB_INFINITE_TIMEOUT) {}
40
46
PmicliInvokeOptions
(
bool
throw_on_error
, int32_t
invoke_timeout_s
)
47
: throw_on_error_(throw_on_error), invoke_timeout_s_(invoke_timeout_s) {}
48
50
virtual
~PmicliInvokeOptions
() {};
51
52
/* Accessors */
53
56
bool
throw_on_error
()
const
{
return
throw_on_error_; }
63
PmicliInvokeOptions
&
set_throw_on_error
(
bool
throw_on_error
) { throw_on_error_ =
throw_on_error
;
return
*
this
; }
64
66
int32_t
invoke_timeout_s
()
const
{
return
invoke_timeout_s_; }
70
PmicliInvokeOptions
&
set_invoke_timeout_s
(int32_t
invoke_timeout_s
) { invoke_timeout_s_ =
invoke_timeout_s
;
return
*
this
; }
71
72
protected
:
73
74
private
:
75
76
bool
throw_on_error_;
77
int32_t invoke_timeout_s_;
78
};
79
80
}
// namespace
© 2014
ScaleOut Software, Inc.