Oracle Coherence for C++ API
Release 3.6.1.0
E18813-01

- Main Page
- Namespaces
- Classes
- Files

# coherence/util/HashSet.hpp

    00001 /*
    00002 * HashSet.hpp
    00003 *
    00004 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    00005 *
    00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
    00007 * affiliates.
    00008 *
    00009 * This software is the confidential and proprietary information of Oracle
    00010 * Corporation. You shall not disclose such confidential and proprietary
    00011 * information and shall use it only in accordance with the terms of the
    00012 * license agreement you entered into with Oracle.
    00013 *
    00014 * This notice may not be removed or altered.
    00015 */
    00016 #ifndef COH_HASH_SET_HPP
    00017 #define COH_HASH_SET_HPP
    00018
    00019 #include "coherence/lang.ns"
    00020
    00021 #include "coherence/util/MappedSet.hpp"
    00022
    00023 COH_OPEN_NAMESPACE2(coherence,util)
    00024
    00025
    00026 /**
    00027 * Set implementation which is backed by a HashMap.
    00028 *
    00029 * @author mf  2008.02.25
    00030 */
    00031 class COH_EXPORT HashSet
    00032     : public cloneable_spec<HashSet,
    00033         extends<MappedSet> >
    00034     {
    00035     friend class factory<HashSet>;
    00036
    00037     // ----- constructors ---------------------------------------------------
    00038
    00039     protected:
    00040         /**
    00041         * Construct a hash set using the specified settings.
    00042         *
    00043         * @param cInitialBuckets  the initial number of hash buckets,
    00044         *                         0 &lt; n
    00045         * @param flLoadFactor     the acceptable load factor before resizing
    00046         *                         occurs, 0 &lt; n, such that a load factor
    00047         *                         of 1.0 causes resizing when the number of
    00048         *                         entries exceeds the number of buckets
    00049         * @param flGrowthRate     the rate of bucket growth when a resize
    00050         *                         occurs, 0 &lt; n, such that a growth rate
    00051         *                         of 1.0 will double the number of buckets:
    00052         *                         bucketcount = bucketcount * (1 + growthrate)
    00053         */
    00054         HashSet(size32_t cInitialBuckets = 17,
    00055                 float32_t flLoadFactor = 1.0F,
    00056                 float32_t flGrowthRate = 3.0F);
    00057
    00058         /**
    00059         * Copy constructor.
    00060         */
    00061         HashSet(const HashSet& that);
    00062     };
    00063
    00064 COH_CLOSE_NAMESPACE2
    00065
    00066 #endif // COH_HASH_SET

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.