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.

Author:
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.
virtual
SafeHashMap::Entry::Handle 
instantiateEntry (Object::View vKey, Object::Holder ohValue, size32_t nHash)
 Factory pattern, initialized with the specified valued.

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

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

Parameters:
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.

Parameters:
vKey the key to hash
Returns:
the hash code to use for the key


Classes

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.

Parameters:
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 (c) 2000-2008 Oracle. All rights reserved.