Show / Hide Table of Contents

Interface IQueryCache

ICache with additional query features.

Inherited Members
ICache.GetAll(ICollection)
ICache.Insert(object, object)
ICache.Insert(object, object, long)
ICache.InsertAll(IDictionary)
ICache.Entries
ICache.GetEnumerator()
IDictionary.Add(object, object)
IDictionary.Clear()
IDictionary.Contains(object)
IDictionary.Remove(object)
IDictionary.IsFixedSize
IDictionary.IsReadOnly
IDictionary.this[object]
IDictionary.Keys
IDictionary.Values
ICollection.CopyTo(Array, int)
ICollection.Count
ICollection.IsSynchronized
ICollection.SyncRoot
Namespace: Tangosol.Net.Cache
Assembly: Coherence.dll
Syntax
public interface IQueryCache : ICache, IDictionary, ICollection, IEnumerable

Methods

AddIndex(IValueExtractor, bool, IComparer)

Add an index to this IQueryCache.

Declaration
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 null.

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 null if the entries' values natural ordering should be used.

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
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
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 null if the entries' values natural ordering should be used.

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
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
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
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 null if the entries' values natural ordering should be used.

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
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.

In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.