ScaleOut C++ Native Client API
5.1
|
The ObjectPolicy class contains extended parameter information for the TypedNamedCache::insert and TypedNamedCache.put methods. More...
#include <object_policy.h>
Public Types | |
enum | TimeoutType { Sliding = SOSSLIB_TIMEOUT_SLIDING, Absolute = SOSSLIB_TIMEOUT_ABSOLUTE, ResetOnUpdate = SOSSLIB_TIMEOUT_ABS_ON_READ } |
Enumeration used to indicate the type of timeout an object uses. More... | |
enum | PreemptionPriority { NotRemovable = 0, Normal = 1 } |
Enumeration used to indicate the priority of keeping a given object in StateServer memory. More... | |
Public Member Functions | |
ObjectPolicy () | |
Default constructor. More... | |
ObjectPolicy (NamedCache *named_cache) | |
Creates an ObjectPolicy instance based off of the default policies used by a named cache instance. | |
virtual | ~ObjectPolicy () |
Destructor. | |
boost::posix_time::time_duration | timeout () const |
Gets the object timeout. | |
ObjectPolicy & | set_timeout (boost::posix_time::time_duration timeout) |
Sets the object timeout. More... | |
TimeoutType | timeout_type () const |
Gets the timeout time for the object. | |
ObjectPolicy & | set_timeout_type (TimeoutType timeout_type) |
Sets the timeout time for the object. More... | |
PreemptionPriority | preemption_priority () const |
Gets the default preemption priority the object. | |
ObjectPolicy & | set_preemption_priority (PreemptionPriority preemption_priority) |
Sets the default preemption priority the object. More... | |
bool | allow_push_repl () const |
Gets whether the object is subject to GeoServer "push" replication. | |
ObjectPolicy & | set_allow_push_repl (bool allow_push_repl) |
Sets whether the object is subject to GeoServer "push" replication. More... | |
std::vector< SossKey > | parents () const |
Gets keys to objects on which the object being added depends. | |
ObjectPolicy & | set_parents (std::vector< SossKey > parents) |
Sets keys to objects on which the object being added depends. More... | |
Static Public Attributes | |
static const boost::posix_time::time_duration | INFINITE_TIMEOUT |
The timeout value to supply when creating a new object if you never want that object to expire due to inactivity. | |
static const boost::posix_time::time_duration | MAX_TIMEOUT |
The maximum allowed timeout value if an infinite timeout is not used. Currently 4,194,303 seconds. | |
static const size_t | MAX_NUM_PARENTS = SOSSLIB_MAX_PARENTS |
Gets the maximum number of dependencies StateServer currently supports. Currently up to 2 parent objects are allowed. | |
static const ObjectPolicy | CACHE_DEFAULTS |
ObjectPolicy constant that indicates to a named cache put/insert operation that the inserted object should the cache's default policies. More... | |
Friends | |
template<typename T > | |
class | TypedNamedCache |
The ObjectPolicy class contains extended parameter information for the TypedNamedCache::insert and TypedNamedCache.put methods.
This class allows you to specify the StateServer object timeout, the type of timeout, whether the object may be removed from memory if memory availability becomes constrained, and any dependencies this object has on other StateServer objects. Advanced features such as GeoServer replication policies can also be controlled using this class.
Enumeration used to indicate the priority of keeping a given object in StateServer memory.
Enumeration used to indicate the type of timeout an object uses.
sosscli::ObjectPolicy::ObjectPolicy | ( | ) |
Default constructor.
Creates a ObjectPolicy instance with an infinite sliding timeout, a normal preemption priority, no parents, and is eligible for GeoServer push replication.
|
inline |
Sets whether the object is subject to GeoServer "push" replication.
|
inline |
Sets keys to objects on which the object being added depends.
|
inline |
Sets the default preemption priority the object.
|
inline |
Sets the object timeout.
|
inline |
Sets the timeout time for the object.
|
static |
ObjectPolicy constant that indicates to a named cache put/insert operation that the inserted object should the cache's default policies.