Apache Geode Native .NET Reference 1.15.0
Apache::Geode::Client::CacheableDate Class Reference

An immutable date wrapper that can serve as a distributable key object for caching as well as being a string value. More...

#include <CacheableDate.hpp>

Inherits Apache::Geode::Client::ICacheableKey, and Apache::Geode::Client::IDataSerializablePrimitive.

Public Member Functions

 CacheableDate ()
 Allocates a new default instance. More...
 
 CacheableDate (DateTime dateTime)
 Initializes a new instance of the CacheableDate to the given System.DateTime value. More...
 
virtual bool Equals (ICacheableKey^ other)
 Return true if this key matches other object. More...
 
virtual bool Equals (Object^ obj) override
 Return true if this key matches other object. More...
 
virtual void FromData (DataInput^ input)
 Deserialize this object, typical implementation should return the 'this' pointer. More...
 
virtual System::Int32 GetHashCode () override
 Return the hashcode for this key. More...
 
virtual void ToData (DataOutput^ output)
 Serializes this object. More...
 
virtual String ^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

static CacheableDateCreate ()
 Static function that returns a new default instance. More...
 
static CacheableDateCreate (DateTime dateTime)
 Static function that returns a new instance initialized to the given System.DateTime value. More...
 
static ISerializableCreateDeserializable ()
 Factory function to register this class. More...
 

Static Public Attributes

static initonly DateTime EpochTime
 DataTime value since 1/1/1970 More...
 

Properties

int8_t DsCode [get]
 Returns the classId of the instance being serialized. More...
 
virtual System::UInt64 ObjectSize [get]
 return the size of this object in bytes More...
 
DateTime Value [get]
 Gets the System.DateTime value. More...
 

Detailed Description

An immutable date wrapper that can serve as a distributable key object for caching as well as being a string value.

Constructor & Destructor Documentation

◆ CacheableDate() [1/2]

Apache::Geode::Client::CacheableDate::CacheableDate ( )
inline

Allocates a new default instance.

◆ CacheableDate() [2/2]

Apache::Geode::Client::CacheableDate::CacheableDate ( DateTime  dateTime)

Initializes a new instance of the CacheableDate to the given System.DateTime value.

Parameters
dateTimeA System.DateTime value to initialize this instance.

Member Function Documentation

◆ Create() [1/2]

static CacheableDate ^ Apache::Geode::Client::CacheableDate::Create ( )
inlinestatic

Static function that returns a new default instance.

◆ Create() [2/2]

static CacheableDate ^ Apache::Geode::Client::CacheableDate::Create ( DateTime  dateTime)
inlinestatic

Static function that returns a new instance initialized to the given System.DateTime value.

◆ CreateDeserializable()

static ISerializable ^ Apache::Geode::Client::CacheableDate::CreateDeserializable ( )
inlinestatic

Factory function to register this class.

◆ Equals() [1/2]

virtual bool Apache::Geode::Client::CacheableDate::Equals ( ICacheableKey other)
virtual

Return true if this key matches other object.

Implements Apache::Geode::Client::ICacheableKey.

◆ Equals() [2/2]

virtual bool Apache::Geode::Client::CacheableDate::Equals ( Object^  obj)
overridevirtual

Return true if this key matches other object.

◆ FromData()

virtual void Apache::Geode::Client::CacheableDate::FromData ( DataInput input)
virtual

Deserialize this object, typical implementation should return the 'this' pointer.

Parameters
inputthe DataInput stream to use for reading the object data
Returns
the deserialized object

◆ GetHashCode()

virtual System::Int32 Apache::Geode::Client::CacheableDate::GetHashCode ( )
overridevirtual

Return the hashcode for this key.

Implements Apache::Geode::Client::ICacheableKey.

◆ ToData()

virtual void Apache::Geode::Client::CacheableDate::ToData ( DataOutput output)
virtual

Serializes this object.

Parameters
outputthe DataOutput object to use for serializing the object

◆ ToString()

virtual String ^ Apache::Geode::Client::CacheableDate::ToString ( )
overridevirtual

Return a string representation of the object.

Implements Apache::Geode::Client::ISerializable.

Field Documentation

◆ EpochTime

initonly DateTime Apache::Geode::Client::CacheableDate::EpochTime
staticinitonly
Initial value:
= DateTime(1970, 1, 1,
0, 0, 0, DateTimeKind::Utc)

DataTime value since 1/1/1970

Property Documentation

◆ DsCode

int8_t Apache::Geode::Client::CacheableDate::DsCode
get

Returns the classId of the instance being serialized.

This is used by deserialization to determine what instance type to create and deserialize into.

Returns
the classId

◆ ObjectSize

virtual System:: UInt64 Apache::Geode::Client::CacheableDate::ObjectSize
get

return the size of this object in bytes

return the size of this object in bytes

◆ Value

DateTime Apache::Geode::Client::CacheableDate::Value
get

Gets the System.DateTime value.


Apache Geode C++ Cache .NET API Documentation