Class ConverterCollections.ConverterQueryCache
A Converter QueryCache views an underlying IQueryCache through a set of key and value IConverters.
Inheritance
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
[Serializable]
public class ConverterCollections.ConverterQueryCache : ConverterCollections.ConverterCache, IQueryCache, ICache, IDictionary, ICollection, IEnumerable
Constructors
ConverterQueryCache(IQueryCache, IConverter, IConverter, IConverter, IConverter)
Constructor.
Declaration
public ConverterQueryCache(IQueryCache cache, IConverter convKeyUp, IConverter convKeyDown, IConverter convValUp, IConverter convValDown)
Parameters
Type | Name | Description |
---|---|---|
IQueryCache | cache | The underlying IQueryCache. |
IConverter | convKeyUp | The IConverter to view the underlying cache's keys through. |
IConverter | convKeyDown | The IConverter to use to pass keys down to the underlying cache. |
IConverter | convValUp | The IConverter to view the underlying cache's values through. |
IConverter | convValDown | The IConverter to use to pass values down to the underlying cache. |
Properties
QueryCache
The underlying IQueryCache.
Declaration
public virtual IQueryCache QueryCache { get; }
Property Value
Type | Description |
---|---|
IQueryCache | The underlying IQueryCache. |
Methods
AddIndex(IValueExtractor, bool, IComparer)
Add an index to this IQueryCache.
Declaration
public virtual void AddIndex(IValueExtractor extractor, bool isOrdered, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The IValueExtractor object that is used to
extract an indexable object from a value stored in the
indexed cache. Must not be |
bool | isOrdered | true if the contents of the indexed information should be ordered; false otherwise. |
IComparer | comparer | The IComparer object which imposes an ordering on
entries in the indexed cache; or |
Remarks
This allows to correlate values stored in this indexed cache (or attributes of those values) to the corresponding keys in the indexed dictionary and increase the performance of GetKeys and GetEntries methods.
GetEntries(IFilter)
Return a collection of the entries contained in this cache that satisfy the criteria expressed by the filter.
Declaration
public virtual ICacheEntry[] GetEntries(IFilter filter)
Parameters
Type | Name | Description |
---|---|---|
IFilter | filter | The IFilter object representing the criteria that the entries of this cache should satisfy. |
Returns
Type | Description |
---|---|
ICacheEntry[] | A collection of entries that satisfy the specified criteria. |
GetEntries(IFilter, IComparer)
Return a collection of the entries contained in this cache that satisfy the criteria expressed by the filter.
Declaration
public virtual ICacheEntry[] GetEntries(IFilter filter, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
IFilter | filter | The IFilter object representing the criteria that the entries of this cache should satisfy. |
IComparer | comparer | The IComparable object which imposes an ordering on
entries in the resulting collection; or |
Returns
Type | Description |
---|---|
ICacheEntry[] | A collection of entries that satisfy the specified criteria. |
Remarks
It is guaranteed that enumerator will traverse the array in such a way that the entry values come up in ascending order, sorted by the specified comparer or according to the natural ordering.
GetKeys(IFilter)
Return a collection of the keys contained in this cache for entries that satisfy the criteria expressed by the filter.
Declaration
public virtual object[] GetKeys(IFilter filter)
Parameters
Type | Name | Description |
---|---|---|
IFilter | filter | The IFilter object representing the criteria that the entries of this cache should satisfy. |
Returns
Type | Description |
---|---|
object[] | A collection of keys for entries that satisfy the specified criteria. |
GetValues(IFilter)
Return a collection of the values contained in this cache for entries that satisfy the criteria expressed by the filter.
Declaration
public virtual object[] GetValues(IFilter filter)
Parameters
Type | Name | Description |
---|---|---|
IFilter | filter | The IFilter object representing the criteria that the entries of this cache should satisfy. |
Returns
Type | Description |
---|---|
object[] | A collection of the values for entries that satisfy the specified criteria. |
GetValues(IFilter, IComparer)
Return a collection of the values contained in this cache for entries that satisfy the criteria expressed by the filter.
Declaration
public virtual object[] GetValues(IFilter filter, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
IFilter | filter | The IFilter object representing the criteria that the entries of this cache should satisfy. |
IComparer | comparer | The IComparable object which imposes an ordering on
entries in the resulting collection; or |
Returns
Type | Description |
---|---|
object[] | A collection of entries that satisfy the specified criteria. |
Remarks
It is guaranteed that enumerator will traverse the array in such a way that the values come up in ascending order, sorted by the specified comparer or according to the natural ordering.
RemoveIndex(IValueExtractor)
Remove an index from this IQueryCache.
Declaration
public virtual void RemoveIndex(IValueExtractor extractor)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The IValueExtractor object that is used to extract an indexable object from a value stored in the cache. |