gemfire::HashSetOfCacheableKey Class Reference

Inherits gemfire::HashSetT< TKEY >< gemfire::SharedPtr >, and gemfire::SharedBase.


Detailed Description

A hash set of CacheableKey objects that also extends SharedBase for smart pointers.

Public Types

typedef
_HashSetOfCacheableKey::Iterator 
Iterator
 Iterator class for the hash set.

Public Member Functions

Iterator begin () const
 Get an iterator pointing to the start of hash_set.
int32_t bucket_count () const
 Returns the number of buckets used by the hash set.
void clear ()
 Erases all of the elements.
bool contains (const TKEY &k) const
 Check if a given key k exists in the hash set.
int32_t count (const TKEY &k) const
 Counts the number of elements whose key is k.
bool empty () const
 true if the hash set's size is 0.
Iterator end () const
 Get an iterator pointing to the end of hash_set.
int32_t erase (const TKEY &k)
 Erases the element whose key is k.
 HashSetOfCacheableKey (const HashSetOfCacheableKey &other)
 Copy constructor.
 HashSetOfCacheableKey (int32_t n)
 Creates an empty hash set with at least n buckets.
 HashSetOfCacheableKey ()
 Create an empty HashSet.
bool insert (const TKEY &k)
 Inserts the key k into the hash set, when k does not exist in the hash set.
int32_t max_size () const
 Returns the largest possible size of the hash set.
void preserveSB () const
 Atomically increment reference count.
int32_t refCount ()
 
Returns:
the reference count

void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
void resize (int32_t n)
 Increases the bucket count to at least n.
int32_t size () const
 Returns the size of the hash set.
void swap (HashSetT &other)
 Swaps the contents of two hash sets.

Member Typedef Documentation

typedef _HashSetOfCacheableKey::Iterator gemfire::HashSetOfCacheableKey::Iterator

Iterator class for the hash set.


Constructor & Destructor Documentation

gemfire::HashSetOfCacheableKey::HashSetOfCacheableKey (  )  [inline]

Create an empty HashSet.

gemfire::HashSetOfCacheableKey::HashSetOfCacheableKey ( int32_t  n  )  [inline]

Creates an empty hash set with at least n buckets.

gemfire::HashSetOfCacheableKey::HashSetOfCacheableKey ( const HashSetOfCacheableKey other  )  [inline]

Copy constructor.


Member Function Documentation

template<typename TKEY>
Iterator gemfire::HashSetT< TKEY >::begin (  )  const [inline, inherited]

Get an iterator pointing to the start of hash_set.

template<typename TKEY>
int32_t gemfire::HashSetT< TKEY >::bucket_count (  )  const [inline, inherited]

Returns the number of buckets used by the hash set.

template<typename TKEY>
void gemfire::HashSetT< TKEY >::clear (  )  [inline, inherited]

Erases all of the elements.

template<typename TKEY>
bool gemfire::HashSetT< TKEY >::contains ( const TKEY &  k  )  const [inline, inherited]

Check if a given key k exists in the hash set.

template<typename TKEY>
int32_t gemfire::HashSetT< TKEY >::count ( const TKEY &  k  )  const [inline, inherited]

Counts the number of elements whose key is k.

template<typename TKEY>
bool gemfire::HashSetT< TKEY >::empty (  )  const [inline, inherited]

true if the hash set's size is 0.

template<typename TKEY>
Iterator gemfire::HashSetT< TKEY >::end (  )  const [inline, inherited]

Get an iterator pointing to the end of hash_set.

template<typename TKEY>
int32_t gemfire::HashSetT< TKEY >::erase ( const TKEY &  k  )  [inline, inherited]

Erases the element whose key is k.

template<typename TKEY>
bool gemfire::HashSetT< TKEY >::insert ( const TKEY &  k  )  [inline, inherited]

Inserts the key k into the hash set, when k does not exist in the hash set.

template<typename TKEY>
int32_t gemfire::HashSetT< TKEY >::max_size (  )  const [inline, inherited]

Returns the largest possible size of the hash set.

void gemfire::SharedBase::preserveSB (  )  const [inherited]

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount (  )  [inline, inherited]

Returns:
the reference count

void gemfire::SharedBase::releaseSB (  )  const [inherited]

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

template<typename TKEY>
void gemfire::HashSetT< TKEY >::resize ( int32_t  n  )  [inline, inherited]

Increases the bucket count to at least n.

template<typename TKEY>
int32_t gemfire::HashSetT< TKEY >::size (  )  const [inline, inherited]

Returns the size of the hash set.

template<typename TKEY>
void gemfire::HashSetT< TKEY >::swap ( HashSetT< TKEY > &  other  )  [inline, inherited]

Swaps the contents of two hash sets.


GemFire C++ Cache API Documentation