Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class SegmentedHashSet

    java.lang.Object
      java.util.AbstractCollection
          java.util.AbstractSet
              com.tangosol.util.MapSet
                  com.tangosol.util.SegmentedHashSet

All Implemented Interfaces:
  ExternalizableLite, java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Set

    public class SegmentedHashSet

extends MapSet

An implementation of java.util.Set that is optimized for heavy concurrent use.

Since:
  Coherence 3.5.1
Author:
  jh 2009.08.28

Field Summary

Fields inherited from class com.tangosol.util.MapSet
`m_map, NO_VALUE`

Constructor Summary
`SegmentedHashSet()` Construct a thread-safe hash set using the default settings.
`SegmentedHashSet(int cInitialBuckets, float flLoadFactor, float flGrowthRate)` Construct a thread-safe hash set using the specified settings.

Method Summary
`protected java.util.Map` | `instantiateMap()` Factory pattern: Provide an underlying Map for this Set implementation to store its contents in.

Methods inherited from class com.tangosol.util.MapSet
`add, addAll, clear, clone, contains, containsAll, getMap, iterator, readExternal, readExternal, remove, removeAll, retainAll, size, toArray, toArray, writeExternal, writeExternal`

Methods inherited from class java.util.AbstractSet
`equals, hashCode`

Methods inherited from class java.util.AbstractCollection
`isEmpty, toString`

Methods inherited from interface java.util.Set
`isEmpty`

Constructor Detail

### SegmentedHashSet

    public SegmentedHashSet()

  Construct a thread-safe hash set using the default settings.

### SegmentedHashSet

    public SegmentedHashSet(int cInitialBuckets,
                            float flLoadFactor,
                            float flGrowthRate)

  Construct a thread-safe hash set 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)

Method Detail

### instantiateMap

    protected java.util.Map instantiateMap()

  Factory pattern: Provide an underlying Map for this Set implementation to store its contents in.

  Overrides:
    `instantiateMap` in class `MapSet`
  Returns:
    a new Map instance

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.