VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
Implement a date object based on epoch of January 1, 1970 00:00:00 GMT that can serve as a distributable key object for caching as well as being a date value. More...
#include <CacheableDate.hpp>
Inherits internal::DataSerializablePrimitive, and apache::geode::client::CacheableKey.
Public Member Functions | |
| CacheableDate (const duration &value) | |
| Construct from std::chrono::seconds since POSIX epoch. | |
| CacheableDate (const time_point &value) | |
| Construct from std::chrono::time_point<std::chrono::system_clock>. | |
| CacheableDate (const time_t value=0) | |
| Constructor, used for deserialization. | |
| virtual int32_t | hashcode () const override |
| Returns a hash code value for this object. | |
| virtual int64_t | milliseconds () const |
| virtual size_t | objectSize () const override |
| virtual bool | operator== (const CacheableKey &other) const override |
| std::string | toString () const override |
| Display this object as 'string', which depends on the implementation in the subclasses. | |
Static Public Member Functions | |
| static std::shared_ptr< CacheableDate > | create () |
| Factory method for creating an instance of CacheableDate. | |
| template<class _T > | |
| static std::shared_ptr< CacheableKey > | create (_T value) |
| Factory method that creates the key type that matches the type of value. | |
| static std::shared_ptr< Serializable > | createDeserializable () |
| creation function for dates. | |
Detailed Description
Implement a date object based on epoch of January 1, 1970 00:00:00 GMT that can serve as a distributable key object for caching as well as being a date value.
Constructor & Destructor Documentation
◆ CacheableDate() [1/3]
|
explicit |
Constructor, used for deserialization.
◆ CacheableDate() [2/3]
|
explicit |
Construct from std::chrono::time_point<std::chrono::system_clock>.
◆ CacheableDate() [3/3]
|
explicit |
Construct from std::chrono::seconds since POSIX epoch.
Member Function Documentation
◆ create() [1/2]
|
inlinestatic |
Factory method for creating an instance of CacheableDate.
◆ create() [2/2]
|
staticinherited |
Factory method that creates the key type that matches the type of value.
For user defined derivations of CacheableKey, the method apache::geode::client::CacheableKey::create may be overloaded.
◆ createDeserializable()
|
static |
creation function for dates.
◆ hashcode()
|
overridevirtual |
Returns a hash code value for this object.
The result is the exclusive OR of the two halves of the primitive long value returned by the milliseconds() method.
- Returns
- the hashcode for this object.
Implements apache::geode::client::CacheableKey.
◆ milliseconds()
|
virtual |
- Returns
- milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
◆ objectSize()
|
inlineoverridevirtual |
- Returns
- the size of the object in bytes
Reimplemented from apache::geode::client::Serializable.
◆ operator==()
|
overridevirtual |
- Returns
- true if this key matches other.
Implements apache::geode::client::CacheableKey.
◆ toString()
|
overridevirtual |
Display this object as 'string', which depends on the implementation in the subclasses.
The default implementation renders the classname.
Reimplemented from apache::geode::client::Serializable.
Apache Geode C++ Cache API Documentation