ScaleOut C++ Native Client API  5.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
sosscli::PutResult Class Reference

The PutResult class represents the result of a put, insert, or update operation. More...

#include <put_result.h>

Public Types

enum  PutOutcome { Error, CreatedObject, UpdatedObject }
 Enumeration describing the outcome of a put operation. More...
 

Public Member Functions

 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)
 Constructor (intended for use by the C++ API, not client applications).
 
virtual ~PutResult ()
 Destructor.
 
PutOutcome outcome ()
 Indicates whether the object was inserted or updated.
 
int32_t version ()
 Gets the object's version, which can be used for optimistic updates. More...
 
LockTicket lock_ticket ()
 Gets the lock ticket returned by a locking insert or update operation.
 
int32_t return_code ()
 Gets the code returned from the ScaleOut StateServer service, where negative values indicate that an error occurred.
 
bool client_cache_hit ()
 Gets whether the inserted object was also inserted into the local, in-process client cache.
 

Detailed Description

The PutResult class represents the result of a put, insert, or update operation.

Member Enumeration Documentation

Enumeration describing the outcome of a put operation.

Enumerator
Error 

The operation did not succeed due to an error.

CreatedObject 

The operation resulted in a new object being inserted into the named cache.

UpdatedObject 

The operation resulted in an exising object being updated.

Member Function Documentation

int32_t sosscli::PutResult::version ( )
inline

Gets the object's version, which can be used for optimistic updates.

See Also
TypedNamedCache::update_optimistic
GetResult::version

The documentation for this class was generated from the following file: