FileBackedDictionary<TKey, TValue, TKeyElem, TValueElem> Class

Represents a lookup table of key/value pairs backed by a file, with very little memory overhead.

Definition

Namespace: Gemstone.IO.Collections
Assembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.128 -- Release Build+2960d3f3619fdc53cad514a51817286dcfb19027
public class FileBackedDictionary<TKey, TValue, TKeyElem, TValueElem> : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IEnumerable, IDisposable
Inheritance
Object    FileBackedDictionary<TKey, TValue, TKeyElem, TValueElem>
Derived
Implements
ICollection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IDisposable

Type Parameters

TKey
The type of the keys in the lookup table.
TValue
The type of the values in the lookup table.
TKeyElem
The element type of TKey when it is a IList type; otherwise, Object.
TValueElem
The element type of TValue when it is a IList type; otherwise, Object.

Constructors

Properties

CacheSize Gets or sets the size of the cache used to store data from the file in memory.
Count Gets the number of elements contained in the FileBackedDictionary<TKey, TValue>.
DefaultSignature Gets the default signature used by the FileBackedDictionary<TKey, TValue> if no user-defined signature is supplied.
FilePath Gets or sets the path to the file backing this dictionary.
FragmentationCount Gets the number of operations that fragment the lookup table that have occurred since the last time the lookup table was compacted.
IsReadOnly Gets a value indicating whether the FileBackedDictionary<TKey, TValue> is read-only.
Item Gets or sets the element with the specified key.
Keys Gets an FileBackedDictionary<TKey, TValue> containing the keys of the FileBackedDictionary<TKey, TValue>.
Signature Gets or sets the signature of the file backing the lookup table.
Values Gets an FileBackedDictionary<TKey, TValue> containing the values in the FileBackedDictionary<TKey, TValue>.

Methods

Add(KeyValuePair<TKey, TValue>) Adds an item to the FileBackedDictionary<TKey, TValue>.
Add(TKey, TValue) Adds an element with the provided key and value to the FileBackedDictionary<TKey, TValue>.
Clear Removes all items from the FileBackedDictionary<TKey, TValue>.
Close Closes the file backing this dictionary.
Compact Defragments the item section of the dictionary, which gets fragmented after removing keys or updating values.
Contains Determines whether the FileBackedDictionary<TKey, TValue> contains a specific value.
ContainsKey Determines whether the FileBackedDictionary<TKey, TValue> contains an element with the specified key.
CopyTo Copies the elements of the FileBackedDictionary<TKey, TValue> to an Array, starting at a particular Array index.
Dispose Releases all the resources used by the FileBackedDictionary<TKey, TValue> object.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetEnumerator Returns an enumerator that iterates through the collection.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetKeys Gets an enumerable used to iterate only the keys in the dictionary.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValues Gets an enumerable used to iterate only the values in the dictionary.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Open Opens the file backing this dictionary.
OpenRead Opens the file backing this hash set in read-only mode.
Remove(TKey) Removes the element with the specified key from the FileBackedDictionary<TKey, TValue>.
Remove(KeyValuePair<TKey, TValue>) Removes the first occurrence of a specific object from the FileBackedDictionary<TKey, TValue>.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryGetValue Gets the value associated with the specified key.

See Also