Oracle Coherence for C++ API


IdentityHashMap Class Reference

#include <coherence/util/IdentityHashMap.hpp>

Inherits SafeHashMap.

List of all members.

Detailed Description

IdentityHashMap is a HashMap implementation where key equality is based on reference rather then value equality.

mf 2008.05.27

Public Types

typedef spec::Handle Handle
 IdentityHashMap Handle definition.
typedef spec::View View
 IdentityHashMap View definition.
typedef spec::Holder Holder
 IdentityHashMap Holder definition.

Protected Member Functions

 IdentityHashMap (size32_t cInitialBuckets=17, float32_t flLoadFactor=1.0F, float32_t flGrowthRate=3.0F)
 Construct a thread-safe weak hash map using the specified settings.
 IdentityHashMap (const IdentityHashMap &that)
 Copy Constructor.
instantiateEntry (Object::View vKey, Object::Holder ohValue, size32_t nHash)
 Factory pattern, initialized with the specified valued.

vKey the associated key
ohValue the assocaited value
nHash the associated hash code
a new instance of the Entry class (or a subclass thereof)

instantiateEntry (SafeHashMap::Entry::View vEntry)
 Factory pattern, instantiate an Entry that is either a deep or shalow copy.

vEntry the Entry to copy
fDeep whether to make a deep copy of the Entry or not

virtual size32_t getHashCode (Object::View vKey) const
 Return the hash code to use for the specified key.

vKey the key to hash
the hash code to use for the key


class  Entry
 A Map::Entry where key equality is based on reference equality. More...

Constructor & Destructor Documentation

IdentityHashMap ( size32_t  cInitialBuckets = 17,
float32_t  flLoadFactor = 1.0F,
float32_t  flGrowthRate = 3.0F 
) [protected]

Construct a thread-safe weak hash map using the specified settings.

cInitialBuckets the initial number of hash buckets, 0 < n
flLoadFactor the acceptable load factor before resizing occurs, 0 < n, such that a load factor of 1.0 causes resizing when the number of entries exceeds the number of buckets
flGrowthRate the rate of bucket growth when a resize occurs, 0 < n, such that a growth rate of 1.0 will double the number of buckets: bucketcount = bucketcount * (1 + growthrate)

The documentation for this class was generated from the following file:
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.