Class SafeHashSet
A thread-safe IDictionary-based ICollection implementation that contains no duplicate elements.
Inherited Members
Namespace: Tangosol.Util.Collections
Assembly: Coherence.dll
Syntax
public class SafeHashSet : DictionarySet, ICollection, IEnumerable, ISerializable
Constructors
SafeHashSet()
Create a new SafeHashSet.
Declaration
public SafeHashSet()
SafeHashSet(ICollection)
Create and populate a new SafeHashSet with the given
collection of elements.
Declaration
public SafeHashSet(ICollection items)
Parameters
| Type | Name | Description |
|---|---|---|
| ICollection | items | The collection of elements to populate the set with. |
SafeHashSet(IDictionary)
Create a new SafeHashSet that uses the specified IDictionary to
store its elements.
Declaration
protected SafeHashSet(IDictionary dict)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary | dict | The storage dictionary. |
SafeHashSet(int)
Create a new SafeHashSet with the specified initial capacity.
Declaration
public SafeHashSet(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| int | capacity | The initial capacity of the backing dictionary. |
SafeHashSet(SerializationInfo, StreamingContext)
Initializes a new instance of the SafeHashSet class using the
specified
SerializationInfo
and StreamingContext.
Declaration
protected SafeHashSet(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | A SerializationInfo
object containing the information required to initialize this
|
| StreamingContext | context | A StreamingContext object containing the source and destination of the serialized stream associated with this dictionary. |
Methods
InstantiateDictionary()
Factory pattern: Provide an underlying dictionary for this thread-safe Set implementation.
Declaration
protected override IDictionary InstantiateDictionary()
Returns
| Type | Description |
|---|---|
| IDictionary | A new thread-safe dictionary instance. |