VMware GemFire Native .NET Reference  9.2.4
Apache::Geode::Client::Properties< TPropKey, TPropValue > Class Template Reference

Provides a collection of properties, each of which is a key/value pair. More...

Inherits SBWrap< apache::geode::client::Properties >, Apache::Geode::Client::IGeodeSerializable, and ISerializable.

Public Member Functions

TPropValue Find (TPropKey key)
 Return the value for the given key, or NULL if not found. More...
 
void ForEach (PropertyVisitorGeneric< TPropKey, TPropValue >^ visitor)
 Execute the Visitor delegate for each entry in the collection. More...
 
virtual IGeodeSerializableFromData (DataInput^ input)
 Deserializes this Properties object. More...
 
void Insert (TPropKey key, TPropValue value)
 Add or update the string value for key. More...
 
void Load (String^ fileName)
 Reads property values from a file, overriding what is currently in the properties object. More...
 
 Properties ()
 Default constructor: returns an empty collection. More...
 
void Remove (TPropKey key)
 Remove the key from the collection. More...
 
virtual void ToData (DataOutput^ output)
 Serializes this Properties object. More...
 
virtual String ^ ToString () override
 Returns a string representation of the current Properties object. More...
 

Static Public Member Functions

template<class TPropKey , class TPropValue >
static Properties< TPropKey, TPropValue > ^ Create ()
 Factory method to create an empty collection of properties. More...
 
template<class TPropKey , class TPropValue >
static Properties< TPropKey, TPropValue > ^ CreateFromVoidPtr (void *ptr)
 Internal factory function to wrap a native object pointer inside this managed class with null pointer check. More...
 

Properties

virtual System::UInt32 ClassId [get]
 Returns the classId of this class for serialization. More...
 
void * NativeIntPtr [get]
 Get the underlying native unmanaged pointer. More...
 
virtual System::UInt32 ObjectSize [get]
 return the size of this object in bytes More...
 
System::UInt32 Size [get]
 Return the number of entries in the collection. More...
 

Detailed Description

template<class TPropKey, class TPropValue>
class Apache::Geode::Client::Properties< TPropKey, TPropValue >

Provides a collection of properties, each of which is a key/value pair.

Each key is a string, and the value may be a string or an integer.

Constructor & Destructor Documentation

◆ Properties()

template<class TPropKey, class TPropValue>
Apache::Geode::Client::Properties< TPropKey, TPropValue >::Properties ( )
inline

Default constructor: returns an empty collection.

Member Function Documentation

◆ Create()

template<class TPropKey, class TPropValue>
template<class TPropKey , class TPropValue >
static Properties<TPropKey, TPropValue> ^ Apache::Geode::Client::Properties< TPropKey, TPropValue >::Create ( )
inlinestatic

Factory method to create an empty collection of properties.

Returns
empty collection of properties

◆ CreateFromVoidPtr()

template<class TPropKey, class TPropValue>
template<class TPropKey , class TPropValue >
static Properties<TPropKey, TPropValue> ^ Apache::Geode::Client::Properties< TPropKey, TPropValue >::CreateFromVoidPtr ( void *  ptr)
inlinestatic

Internal factory function to wrap a native object pointer inside this managed class with null pointer check.

Parameters
ptrThe native IntPtr pointer
Returns
The managed wrapper object; null if the native pointer is null.

◆ Find()

template<class TPropKey, class TPropValue>
TPropValue Apache::Geode::Client::Properties< TPropKey, TPropValue >::Find ( TPropKey  key)

Return the value for the given key, or NULL if not found.

Parameters
keythe key to find
Returns
the value for the key
Exceptions
NullPointerExceptionif the key is null

◆ ForEach()

template<class TPropKey, class TPropValue>
void Apache::Geode::Client::Properties< TPropKey, TPropValue >::ForEach ( PropertyVisitorGeneric< TPropKey, TPropValue >^  visitor)

Execute the Visitor delegate for each entry in the collection.

Parameters
visitorvisitor delegate

◆ FromData()

template<class TPropKey, class TPropValue>
virtual IGeodeSerializable ^ Apache::Geode::Client::Properties< TPropKey, TPropValue >::FromData ( DataInput input)
virtual

Deserializes this Properties object.

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

Implements Apache::Geode::Client::IGeodeSerializable.

◆ Insert()

template<class TPropKey, class TPropValue>
void Apache::Geode::Client::Properties< TPropKey, TPropValue >::Insert ( TPropKey  key,
TPropValue  value 
)

Add or update the string value for key.

Parameters
keythe key to insert
valuethe string value to insert
Exceptions
NullPointerExceptionif the key is null

◆ Load()

template<class TPropKey, class TPropValue>
void Apache::Geode::Client::Properties< TPropKey, TPropValue >::Load ( String^  fileName)

Reads property values from a file, overriding what is currently in the properties object.

Parameters
fileNamethe name of the file

◆ Remove()

template<class TPropKey, class TPropValue>
void Apache::Geode::Client::Properties< TPropKey, TPropValue >::Remove ( TPropKey  key)

Remove the key from the collection.

Parameters
keythe key to remove
Exceptions
NullPointerExceptionif the key is null

◆ ToData()

template<class TPropKey, class TPropValue>
virtual void Apache::Geode::Client::Properties< TPropKey, TPropValue >::ToData ( DataOutput output)
virtual

Serializes this Properties object.

Parameters
outputthe DataOutput stream to use for serialization

Implements Apache::Geode::Client::IGeodeSerializable.

◆ ToString()

template<class TPropKey, class TPropValue>
virtual String ^ Apache::Geode::Client::Properties< TPropKey, TPropValue >::ToString ( )
overridevirtual

Returns a string representation of the current Properties object.

Returns
A comma separated list of property name,value pairs.

Implements Apache::Geode::Client::IGeodeSerializable.

Property Documentation

◆ ClassId

template<class TPropKey, class TPropValue>
virtual System:: UInt32 Apache::Geode::Client::Properties< TPropKey, TPropValue >::ClassId
get

Returns the classId of this class for serialization.

Returns
classId of the Properties class
See also
IGeodeSerializable.ClassId

◆ NativeIntPtr

template<class TPropKey, class TPropValue>
void* Apache::Geode::Client::Properties< TPropKey, TPropValue >::NativeIntPtr
get

Get the underlying native unmanaged pointer.

◆ ObjectSize

template<class TPropKey, class TPropValue>
virtual System:: UInt32 Apache::Geode::Client::Properties< TPropKey, TPropValue >::ObjectSize
get

return the size of this object in bytes

◆ Size

template<class TPropKey, class TPropValue>
System:: UInt32 Apache::Geode::Client::Properties< TPropKey, TPropValue >::Size
get

Return the number of entries in the collection.

Returns
the number of entries

VMware GemFire .NET Cache API Documentation