ScaleOut C++ Native Client API
5.1
|
The SossKey class serves as an identifier for a cached object in a NamedCache collection. More...
#include <soss_key.h>
Public Member Functions | |
SossKey () | |
Constructor. Constructs a null object key. | |
SossKey (const SossKey &other) | |
Copy constructor. More... | |
SossKey (const SOSS_OBJKEY &obj_key) | |
Constructs a SossKey based on a SOSS_OBJKEY struct from the soss_svccli.h C API. More... | |
SossKey (const std::string &key, const uint32_t app_id) | |
Constructs a SossKey based on a string. More... | |
SossKey (const std::wstring &key, const uint32_t app_id) | |
Constructs a SossKey based on a wide string. More... | |
SossKey (const std::vector< uint8_t > &bytes, const uint32_t app_id) | |
Constructs a SossKey based on a vector of bytes (max 32 bytes in length). More... | |
SossKey (const std::string &key) | |
Constructs a SossKey based on a string. More... | |
SossKey (const std::wstring &key) | |
Constructs a SossKey based on a wide string. More... | |
SossKey (const std::vector< uint8_t > &bytes) | |
Constructs a SossKey based on a vector of bytes (max 32 bytes in length). More... | |
SossKey (const char *key) | |
Constructs a SossKey based on a string. More... | |
SossKey (const wchar_t *key) | |
Constructs a SossKey based on a wide string. More... | |
SossKey (int32_t key) | |
Constructs a SossKey based on a signed 32-bit integer. More... | |
SossKey (const int32_t key, const uint32_t app_id) | |
Constructs a SossKey based on a signed 32-bit integer. More... | |
SossKey (uint32_t key) | |
Constructs a SossKey based on an unsigned 32-bit integer. More... | |
SossKey (const uint32_t key, const uint32_t app_id) | |
Constructs a SossKey based on an unsigned 32-bit integer. More... | |
SossKey (int64_t key) | |
Constructs a SossKey based on a signed 64-bit integer. More... | |
SossKey (const int64_t key, const uint32_t app_id) | |
Constructs a SossKey based on a signed 64-bit integer. More... | |
SossKey (uint64_t key) | |
Constructs a SossKey based on an unsigned 64-bit integer. More... | |
SossKey (const uint64_t key, const uint32_t app_id) | |
Constructs a SossKey based on an unsigned 64-bit integer. More... | |
virtual | ~SossKey () |
Destructor. | |
SossKey & | operator= (const SossKey &rhs) |
Assignment operator. | |
SOSS_OBJKEY | obj_key () const |
Gets a copy of the SOSS_OBJKEY struct associated with this SossKey instance. More... | |
uint32_t | app_id () const |
Gets the StateServer application ID associated with this SossKey. More... | |
void | set_app_id (uint32_t app_id) |
Sets the StateServer application ID associated with this SossKey. More... | |
bool | has_app_id () const |
Gets whether this SOSS key has been associated yet with a specific named cache. More... | |
bool | has_string_data () const |
Gets whether this SOSS key has string key data that is immediately available (that is, the method will only return true if retrieval of original string key data from the SOSS service is not required). More... | |
const std::wstring & | retrieve_original_string_key () const |
Gets the locally stored SOSS string key data that is immediately available (that is, the method will only return a string if retrieval of original string key data from the SOSS service is not required). More... | |
void | set_local_string_key_data (const std::vector< wchar_t > &string_key_data) |
Sets the string key data for the locally stored SOSS string key. More... | |
Static Public Attributes | |
static const size_t | MAX_KEY_LENGTH = sizeof(((SOSS_OBJKEY*)0)->obj_id) + sizeof(((SOSS_OBJKEY*)0)->ext_obj_id) |
Maximum number of bytes allowed in a SossKey (currently 32). | |
Friends | |
bool | operator== (const SossKey &key1, const SossKey &key2) |
Equality operator that compares two SossKey objects. | |
bool | operator!= (const SossKey &key1, const SossKey &key2) |
Inequality operator that compares two SossKey objects. | |
std::size_t | hash_value (SossKey const &key) |
Gets a numeric value that is used to insert and identify a SossKey in containers based on the STL. | |
The SossKey class serves as an identifier for a cached object in a NamedCache collection.
sosscli::SossKey::SossKey | ( | const SossKey & | other) |
Copy constructor.
other | The SossKey that this instance is being copied from. |
sosscli::SossKey::SossKey | ( | const SOSS_OBJKEY & | obj_key) |
Constructs a SossKey based on a SOSS_OBJKEY struct from the soss_svccli.h C API.
obj_key | The SOSS_OBJKEY to wrap. |
sosscli::SossKey::SossKey | ( | const std::string & | key, |
const uint32_t | app_id | ||
) |
sosscli::SossKey::SossKey | ( | const std::wstring & | key, |
const uint32_t | app_id | ||
) |
sosscli::SossKey::SossKey | ( | const std::vector< uint8_t > & | bytes, |
const uint32_t | app_id | ||
) |
Constructs a SossKey based on a vector of bytes (max 32 bytes in length).
bytes | A vector of unsigned chars, max 32 bytes long. |
app_id | Application id of a named cache. |
sosscli::SossKey::SossKey | ( | const std::string & | key) |
sosscli::SossKey::SossKey | ( | const std::wstring & | key) |
sosscli::SossKey::SossKey | ( | const std::vector< uint8_t > & | bytes) |
Constructs a SossKey based on a vector of bytes (max 32 bytes in length).
bytes | A vector of unsigned chars, max 32 bytes long. |
sosscli::SossKey::SossKey | ( | const char * | key) |
sosscli::SossKey::SossKey | ( | const wchar_t * | key) |
sosscli::SossKey::SossKey | ( | int32_t | key) |
sosscli::SossKey::SossKey | ( | const int32_t | key, |
const uint32_t | app_id | ||
) |
sosscli::SossKey::SossKey | ( | uint32_t | key) |
sosscli::SossKey::SossKey | ( | const uint32_t | key, |
const uint32_t | app_id | ||
) |
sosscli::SossKey::SossKey | ( | int64_t | key) |
sosscli::SossKey::SossKey | ( | const int64_t | key, |
const uint32_t | app_id | ||
) |
sosscli::SossKey::SossKey | ( | uint64_t | key) |
sosscli::SossKey::SossKey | ( | const uint64_t | key, |
const uint32_t | app_id | ||
) |
|
inline |
Gets the StateServer application ID associated with this SossKey.
|
inline |
Gets whether this SOSS key has been associated yet with a specific named cache.
|
inline |
Gets whether this SOSS key has string key data that is immediately available (that is, the method will only return true if retrieval of original string key data from the SOSS service is not required).
|
inline |
Gets a copy of the SOSS_OBJKEY struct associated with this SossKey instance.
|
inline |
Gets the locally stored SOSS string key data that is immediately available (that is, the method will only return a string if retrieval of original string key data from the SOSS service is not required).
For guaranteed string key retrieval, use NamedCache.get_key_string()
void sosscli::SossKey::set_app_id | ( | uint32_t | app_id) |
Sets the StateServer application ID associated with this SossKey.
|
inline |
Sets the string key data for the locally stored SOSS string key.
Only intended for use by the NamedCache.get_key_string() method, not for use by applications.
string_key_data | Vector of wide characters containing the string data. |