ScaleOut C++ Native Client API
5.1
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
put_result.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_client/soss_key.h"
21
#include "soss_client/lock_ticket.h"
22
23
namespace
sosscli {
24
26
class
PutResult
27
{
28
public
:
29
31
enum
PutOutcome
32
{
34
Error
,
36
CreatedObject
,
38
UpdatedObject
39
};
40
41
/* Constructors */
42
44
PutResult
(
SossKey
&key, uint32_t result_flags, int32_t
version
, int32_t
return_code
, uint32_t put_flags,
LockTicket
const
&prior_lock_ticket,
bool
client_cache_hit
);
45
47
virtual
~PutResult
();
48
49
/* Accessors */
50
52
PutOutcome
outcome
() {
return
outcome_; }
53
57
int32_t
version
() {
return
version_; }
58
60
LockTicket
lock_ticket
() {
return
lock_ticket_; }
61
63
int32_t
return_code
() {
return
return_code_; }
64
66
bool
client_cache_hit
() {
return
client_cache_hit_; }
67
68
protected
:
69
70
private
:
71
PutResult
() {}
72
73
PutOutcome
outcome_;
74
int32_t version_;
75
LockTicket lock_ticket_;
76
int32_t return_code_;
77
bool
client_cache_hit_;
78
};
79
80
}
// namespace
© 2014
ScaleOut Software, Inc.