VMware GemFire Native C++ Reference
9.2.4
|
Go to the documentation of this file.
3 #ifndef GEODE_CACHEABLEDATE_H_
4 #define GEODE_CACHEABLEDATE_H_
23 #include "geode_globals.hpp"
27 #include "GeodeTypeIds.hpp"
54 typedef std::chrono::system_clock clock;
55 typedef std::chrono::time_point<clock> time_point;
56 typedef std::chrono::milliseconds duration;
78 virtual int32_t classId()
const;
85 virtual int8_t typeId()
const;
91 virtual bool operator==(
const CacheableKey& other)
const;
97 __DEPRECATED__(
"Use localtime or similar for calendar conversions.")
98 virtual
int day() const;
104 __DEPRECATED__("Use localtime or similar for calendar conversions.")
105 virtual
int month() const;
111 __DEPRECATED__("Use localtime or similar for calendar conversions.")
112 virtual
int year() const;
115 virtual int64_t milliseconds() const;
123 virtual int32_t hashcode() const;
125 operator time_t()
const {
return m_timevalue / 1000; }
126 operator time_point()
const {
127 return clock::from_time_t(0) + duration(m_timevalue);
129 operator duration()
const {
return duration(m_timevalue); }
142 static CacheableDatePtr create(
const time_point& value) {
143 return CacheableDatePtr(
new CacheableDate(value));
146 static CacheableDatePtr create(
const duration& value) {
147 return CacheableDatePtr(
new CacheableDate(value));
150 virtual CacheableStringPtr toString()
const;
153 virtual ~CacheableDate();
156 virtual int32_t logString(
char* buffer, int32_t maxLength)
const;
160 CacheableDate(
const time_t value = 0);
165 CacheableDate(
const time_point& value);
170 CacheableDate(
const duration& value);
174 void operator=(
const CacheableDate& other);
175 CacheableDate(
const CacheableDate& other);
178 inline CacheableKeyPtr createKey(
const CacheableDate::time_point& value) {
182 inline CacheablePtr createValue(
const CacheableDate::time_point& value) {
190 #endif // GEODE_CACHEABLEDATE_H_
Each enum represents a predefined RegionAttributes in a {}.
Definition: Assert.hpp:31
Implement a date object based on epoch of January 1, 1970 00:00:00 GMT that can serve as a distributa...
Definition: CacheableDate.hpp:45
virtual uint32_t objectSize() const
Definition: CacheableDate.hpp:88
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
static CacheableDatePtr create()
Factory method for creating an instance of CacheableDate.
Definition: CacheableDate.hpp:134
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition: DataOutput.hpp:74
Represents a cacheable key.
Definition: CacheableKey.hpp:36
Provide operations for reading primitive data values, byte arrays, strings, Serializable objects from...
Definition: DataInput.hpp:56
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:52
Definition: Serializable.hpp:53
Pivotal GemFire C++ Cache API Documentation