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.
|
| | CacheableDate (const duration &value) |
| | Construct from std::chrono::seconds since POSIX epoch. More...
|
| |
| | CacheableDate (const time_point &value) |
| | Construct from std::chrono::time_point<std::chrono::system_clock>. More...
|
| |
| | CacheableDate (const time_t value=0) |
| | Constructor, used for deserialization. More...
|
| |
| virtual int32_t | hashcode () const override |
| | Returns a hash code value for this object. More...
|
| |
| 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. More...
|
| |
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.
◆ CacheableDate() [1/3]
| apache::geode::client::CacheableDate::CacheableDate |
( |
const time_t |
value = 0 | ) |
|
|
explicit |
Constructor, used for deserialization.
◆ CacheableDate() [2/3]
| apache::geode::client::CacheableDate::CacheableDate |
( |
const time_point & |
value | ) |
|
|
explicit |
Construct from std::chrono::time_point<std::chrono::system_clock>.
◆ CacheableDate() [3/3]
| apache::geode::client::CacheableDate::CacheableDate |
( |
const duration & |
value | ) |
|
|
explicit |
Construct from std::chrono::seconds since POSIX epoch.
◆ create() [1/2]
| static std::shared_ptr< CacheableDate > apache::geode::client::CacheableDate::create |
( |
| ) |
|
|
inlinestatic |
◆ create() [2/2]
template<class _T >
| static std::shared_ptr< CacheableKey > apache::geode::client::CacheableKey::create |
( |
_T |
value | ) |
|
|
staticinherited |
◆ createDeserializable()
| static std::shared_ptr< Serializable > apache::geode::client::CacheableDate::createDeserializable |
( |
| ) |
|
|
static |
creation function for dates.
◆ hashcode()
| virtual int32_t apache::geode::client::CacheableDate::hashcode |
( |
| ) |
const |
|
overridevirtual |
◆ milliseconds()
| virtual int64_t apache::geode::client::CacheableDate::milliseconds |
( |
| ) |
const |
|
virtual |
- Returns
- milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
◆ objectSize()
| virtual size_t apache::geode::client::CacheableDate::objectSize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ operator==()
| virtual bool apache::geode::client::CacheableDate::operator== |
( |
const CacheableKey & |
other | ) |
const |
|
overridevirtual |
◆ toString()
| std::string apache::geode::client::CacheableDate::toString |
( |
| ) |
const |
|
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.