K
- the key typeV
- the type of the value from which an extracted value is obtainedE
- the type of the extracted value that is being indexedpublic interface MapIndex<K,V,E>
Modifier and Type | Field and Description |
---|---|
static Object |
NO_VALUE
Constant used to indicate that the index does not contain requested
value.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(Map.Entry<? extends K,? extends V> entry)
Update this index in response to a remove operation on a cache.
|
Object |
get(K key)
Using the index information if possible, get the value associated with
the specified key.
|
Comparator<E> |
getComparator()
Get the Comparator used to sort the index.
|
Map<E,Set<K>> |
getIndexContents()
Get the Map that contains the index contents.
|
ValueExtractor<V,E> |
getValueExtractor()
Obtain the ValueExtractor object that the MapIndex uses to extract
an indexable Object from a value stored in the indexed Map.
|
void |
insert(Map.Entry<? extends K,? extends V> entry)
Update this index in response to a insert operation on a cache.
|
boolean |
isOrdered()
Determine if the MapIndex orders the contents of the indexed
information.
|
boolean |
isPartial()
Determine if indexed information for any entry in the indexed Map has
been excluded from this index.
|
void |
update(Map.Entry<? extends K,? extends V> entry)
Update this index in response to an update operation on a cache.
|
static final Object NO_VALUE
ValueExtractor<V,E> getValueExtractor()
boolean isOrdered()
boolean isPartial()
IndexAwareFilter
implementations to
determine the most optimal way to apply the index.
Note: Queries that use a partial index are allowed not to return entries that are not indexed even though they would match the corresponding filter were they evaluated during the full scan (if there were no index). However, it's not allowable for a query to return entries that do not match the corresponding filter, regardless of their presence in the index.
Map<E,Set<K>> getIndexContents()
The keys of the Map are the return values from the ValueExtractor operating against the indexed Map's values, and for each key, the corresponding value stored in the Map is a Set of keys to the indexed Map.
If the MapIndex is known to be ordered, then the returned Map object
will be an instance of SortedMap
. The SortedMap may or may
not have a Comparator
object associated with it; see
SortedMap.comparator()
.
A client should assume that the returned Map object is read-only and must not attempt to modify it.
Object get(K key)
key
- the key that specifies the object to extract the value fromComparator<E> getComparator()
void insert(Map.Entry<? extends K,? extends V> entry)
entry
- the entry representing the object being insertedvoid update(Map.Entry<? extends K,? extends V> entry)
entry
- the entry representing the object being updated