VMware GemFire Native .NET Reference  9.1
Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE > Class Template Reference

A mutable ICacheableKey hash set wrapper that can serve as a distributable object for caching. More...

Inherits Apache::Geode::Client::Serializable, and ICollection< Object^ >.

Data Structures

class  Enumerator
 Enumerator for CacheableHashSet class. More...
 

Public Member Functions

virtual void Add (Object^ item)
 Adds an item to the CacheableHashSet. More...
 
virtual void Clear ()
 Removes all items from the CacheableHashSet. More...
 
virtual bool Contains (Object^ item)
 Determines whether the CacheableHashSet contains a specific value. More...
 
virtual void CopyTo (array< Object^ >^array, System::Int32 arrayIndex)
 Copies the elements of the CacheableHashSet to an System.Array, starting at a particular System.Array index. More...
 
virtual IGeodeSerializableFromData (DataInput^ input) override
 Deserializes the native (C++) object – returns an instance of the Serializable class with the native object wrapped inside. More...
 
virtual IEnumerator< Object^ >^ GetEnumerator ()
 Returns an enumerator that iterates through the CacheableHashSet. More...
 
virtual bool Remove (Object^ item)
 Removes the first occurrence of a specific object from the CacheableHashSet. More...
 
virtual void Resize (System::Int32 size) sealed
 Increases the bucket count to at least size elements. More...
 
virtual void Swap (CacheableHashSetType< TYPEID, HSTYPE >^other) sealed
 Swap the contents of this CacheableHashSet with the given one. More...
 
virtual void ToData (DataOutput^ output) override
 Serializes this native (C++) object. More...
 
virtual String^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

static operator Apache::Geode::Client::Serializable^ (bool value)
 Implicit conversion operator from a boolean to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Byte value)
 Implicit conversion operator from a byte to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Byte >^value)
 Implicit conversion operator from an array of bytes to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< bool >^value)
 Implicit conversion operator from an boolean array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Double value)
 Implicit conversion operator from a double to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Double >^value)
 Implicit conversion operator from a double array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Single value)
 Implicit conversion operator from a float to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Single >^value)
 Implicit conversion operator from a float array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (System::Int16 value)
 Implicit conversion operator from a 16-bit integer to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Char value)
 Implicit conversion operator from a character to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Char >^value)
 Implicit conversion operator from a character array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int16 >^value)
 Implicit conversion operator from a 16-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (System::Int32 value)
 Implicit conversion operator from a 32-bit integer to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int32 >^value)
 Implicit conversion operator from a 32-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int64 >^value)
 Implicit conversion operator from a 64-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (String^ value)
 Implicit conversion operator from a string to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< String^ >^value)
 Implicit conversion operator from a string array to a Serializable. More...
 
static operator Serializable^ (System::Int64 value)
 Implicit conversion operator from a 64-bit integer to a Serializable. More...
 
static void RegisterPdxSerializer (IPdxSerializer^ pdxSerializer)
 Set the PDX serializer for the cache. More...
 
static void RegisterPdxType (PdxTypeFactoryMethod^ creationMethod)
 
static void RegisterTypeGeneric (TypeFactoryMethodGeneric^ creationMethod)
 Register an instance factory method for a given type. More...
 
static void SetPdxTypeMapper (IPdxTypeMapper^ pdxTypeMapper)
 Register an PdxTypeMapper to map the local types to pdx types More...
 

Protected Member Functions

 CacheableHashSetType (apache::geode::client::Serializable *nativeptr)
 Private constructor to wrap a native object pointer More...
 
 CacheableHashSetType (System::Int32 size)
 Allocates a new empty instance with given initial size. More...
 
 CacheableHashSetType ()
 Allocates a new empty instance. More...
 

Properties

System::Int32 BucketCount [get]
 Get the number of buckets used by the HashSet. More...
 
virtual System::UInt32 ClassId [get]
 Returns the classId of the instance being serialized. More...
 
virtual System::Int32 Count [get]
 Gets the number of elements contained in the CacheableHashSet. More...
 
bool IsEmpty [get]
 True if the CacheableHashSet's size is 0. More...
 
virtual bool IsReadOnly [get]
 Gets a value indicating whether the collection is read-only. More...
 
System::Int32 MaxSize [get]
 Get the largest possible size of the CacheableHashSet. More...
 

Detailed Description

template<System::UInt32 TYPEID, typename HSTYPE>
class Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >

A mutable ICacheableKey hash set wrapper that can serve as a distributable object for caching.

Constructor & Destructor Documentation

template<System::UInt32 TYPEID, typename HSTYPE>
Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::CacheableHashSetType ( apache::geode::client::Serializable *  nativeptr)
inlineprotected

Private constructor to wrap a native object pointer

Parameters
nativeptrThe native object pointer
template<System::UInt32 TYPEID, typename HSTYPE>
Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::CacheableHashSetType ( )
inlineprotected

Allocates a new empty instance.

template<System::UInt32 TYPEID, typename HSTYPE>
Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::CacheableHashSetType ( System::Int32  size)
inlineprotected

Allocates a new empty instance with given initial size.

Parameters
sizeThe initial size of the HashSet.

Member Function Documentation

template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Add ( Object^  item)
inlinevirtual

Adds an item to the CacheableHashSet.

Parameters
itemThe object to add to the collection.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Clear ( )
inlinevirtual

Removes all items from the CacheableHashSet.

template<System::UInt32 TYPEID, typename HSTYPE>
virtual bool Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Contains ( Object^  item)
inlinevirtual

Determines whether the CacheableHashSet contains a specific value.

Parameters
itemThe object to locate in the CacheableHashSet.
Returns
true if item is found in the CacheableHashSet; otherwise false.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::CopyTo ( array< Object^ >^  array,
System::Int32  arrayIndex 
)
inlinevirtual

Copies the elements of the CacheableHashSet to an System.Array, starting at a particular System.Array index.

Parameters
arrayThe one-dimensional System.Array that is the destination of the elements copied from CacheableHashSet. The System.Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.
Exceptions
IllegalArgumentExceptionarrayIndex is less than 0 or array is null.
OutOfRangeExceptionarrayIndex is equal to or greater than the length of array. -or-The number of elements in the source CacheableHashSet is greater than the available space from arrayIndex to the end of the destination array.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual IGeodeSerializable ^ Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::FromData ( DataInput input)
inlineoverridevirtual

Deserializes the native (C++) object – returns an instance of the Serializable class with the native object wrapped inside.

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

Reimplemented from Apache::Geode::Client::Serializable.

template<System::UInt32 TYPEID, typename HSTYPE>
virtual IEnumerator<Object^> ^ Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::GetEnumerator ( )
inlinevirtual

Returns an enumerator that iterates through the CacheableHashSet.

Returns
A System.Collections.Generic.IEnumerator that can be used to iterate through the CacheableHashSet.
static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( bool  value)
staticinherited

Implicit conversion operator from a boolean to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Byte  value)
staticinherited

Implicit conversion operator from a byte to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Byte >^  value)
staticinherited

Implicit conversion operator from an array of bytes to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< bool >^  value)
staticinherited

Implicit conversion operator from an boolean array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Double  value)
staticinherited

Implicit conversion operator from a double to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Double >^  value)
staticinherited

Implicit conversion operator from a double array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Single  value)
staticinherited

Implicit conversion operator from a float to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Single >^  value)
staticinherited

Implicit conversion operator from a float array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( System::Int16  value)
staticinherited

Implicit conversion operator from a 16-bit integer to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Char  value)
staticinherited

Implicit conversion operator from a character to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Char >^  value)
staticinherited

Implicit conversion operator from a character array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int16 >^  value)
staticinherited

Implicit conversion operator from a 16-bit integer array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( System::Int32  value)
staticinherited

Implicit conversion operator from a 32-bit integer to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int32 >^  value)
staticinherited

Implicit conversion operator from a 32-bit integer array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int64 >^  value)
staticinherited

Implicit conversion operator from a 64-bit integer array to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( String^  value)
staticinherited

Implicit conversion operator from a string to a Serializable.

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< String^ >^  value)
staticinherited

Implicit conversion operator from a string array to a Serializable.

static Apache::Geode::Client::Serializable::operator Serializable^ ( System::Int64  value)
staticinherited

Implicit conversion operator from a 64-bit integer to a Serializable.

static void Apache::Geode::Client::Serializable::RegisterPdxSerializer ( IPdxSerializer pdxSerializer)
staticinherited

Set the PDX serializer for the cache.

If this serializer is set, it will be consulted to see if it can serialize any domain classes which are added to the cache in portable data exchange format.

static void Apache::Geode::Client::Serializable::RegisterPdxType ( PdxTypeFactoryMethod creationMethod)
staticinherited

Register an instance factory method for a given type. This should be used when registering types that implement IPdxSerializable.

Parameters
creationMethodthe creation function to register
Exceptions
IllegalArgumentExceptionif the method is null
static void Apache::Geode::Client::Serializable::RegisterTypeGeneric ( TypeFactoryMethodGeneric creationMethod)
staticinherited

Register an instance factory method for a given type.

This should be used when registering types that implement IGeodeSerializable.

Parameters
creationMethodthe creation function to register
Exceptions
IllegalArgumentExceptionif the method is null
IllegalStateExceptionif the typeId has already been registered, or there is an error in registering the type; check Utils::LastError for more information in the latter case.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual bool Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Remove ( Object^  item)
inlinevirtual

Removes the first occurrence of a specific object from the CacheableHashSet.

Parameters
itemThe object to remove from the CacheableHashSet.
Returns
true if item was successfully removed from the CacheableHashSet; otherwise, false. This method also returns false if item is not found in the original CacheableHashSet.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Resize ( System::Int32  size)
inlinesealedvirtual

Increases the bucket count to at least size elements.

Parameters
sizeThe new size of the HashSet.
static void Apache::Geode::Client::Serializable::SetPdxTypeMapper ( IPdxTypeMapper pdxTypeMapper)
staticinherited

Register an PdxTypeMapper to map the local types to pdx types

Parameters
pdxTypeMapperObject which implements IPdxTypeMapper interface
template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Swap ( CacheableHashSetType< TYPEID, HSTYPE >^  other)
inlinesealedvirtual

Swap the contents of this CacheableHashSet with the given one.

Parameters
otherThe other CacheableHashSet to use for swapping.
template<System::UInt32 TYPEID, typename HSTYPE>
virtual void Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::ToData ( DataOutput output)
inlineoverridevirtual

Serializes this native (C++) object.

Parameters
outputthe DataOutput object to use for serializing the object

Reimplemented from Apache::Geode::Client::Serializable.

virtual String ^ Apache::Geode::Client::Serializable::ToString ( )
overridevirtualinherited

Return a string representation of the object.

It simply returns the string representation of the underlying native object by calling its toString() function.

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

Reimplemented in Apache::Geode::Client::CacheableBuiltinArray< TNative, TNativePtr, TManaged, TYPEID >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableInt32Array, apache::geode::client::CacheableInt32ArrayPtr, System::Int32, GeodeClassIds::CacheableInt32Array >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableDoubleArray, apache::geode::client::CacheableDoubleArrayPtr, Double, GeodeClassIds::CacheableDoubleArray >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableInt16Array, apache::geode::client::CacheableInt16ArrayPtr, System::Int16, GeodeClassIds::CacheableInt16Array >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableBytes, apache::geode::client::CacheableBytesPtr, Byte, GeodeClassIds::CacheableBytes >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CharArray, apache::geode::client::CharArrayPtr, Char, GeodeClassIds::CharArray >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableFloatArray, apache::geode::client::CacheableFloatArrayPtr, Single, GeodeClassIds::CacheableFloatArray >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::BooleanArray, apache::geode::client::BooleanArrayPtr, bool, GeodeClassIds::BooleanArray >, Apache::Geode::Client::CacheableBuiltinArray< apache::geode::client::CacheableInt64Array, apache::geode::client::CacheableInt64ArrayPtr, System::Int64, GeodeClassIds::CacheableInt64Array >, Apache::Geode::Client::CacheableString, Apache::Geode::Client::CacheableStringArray, Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableFloat, Single, GeodeClassIds::CacheableFloat >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableInt32, System::Int32, GeodeClassIds::CacheableInt32 >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableDouble, Double, GeodeClassIds::CacheableDouble >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableBoolean, bool, GeodeClassIds::CacheableBoolean >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableInt64, System::Int64, GeodeClassIds::CacheableInt64 >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableInt16, System::Int16, GeodeClassIds::CacheableInt16 >, Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableWideChar, Char, GeodeClassIds::CacheableCharacter >, and Apache::Geode::Client::CacheableBuiltinKey< apache::geode::client::CacheableByte, Byte, GeodeClassIds::CacheableByte >.

Property Documentation

template<System::UInt32 TYPEID, typename HSTYPE>
System:: Int32 Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::BucketCount
get

Get the number of buckets used by the HashSet.

template<System::UInt32 TYPEID, typename HSTYPE>
virtual System:: UInt32 Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::ClassId
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
template<System::UInt32 TYPEID, typename HSTYPE>
virtual System:: Int32 Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::Count
get

Gets the number of elements contained in the CacheableHashSet.

template<System::UInt32 TYPEID, typename HSTYPE>
bool Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::IsEmpty
get

True if the CacheableHashSet's size is 0.

template<System::UInt32 TYPEID, typename HSTYPE>
virtual bool Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::IsReadOnly
get

Gets a value indicating whether the collection is read-only.

Returns
always false for CacheableHashSet
template<System::UInt32 TYPEID, typename HSTYPE>
System:: Int32 Apache::Geode::Client::Internal::CacheableHashSetType< TYPEID, HSTYPE >::MaxSize
get

Get the largest possible size of the CacheableHashSet.


Pivotal GemFire .NET Cache API Documentation