|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.SimpleMapIndex
com.tangosol.util.ConditionalIndex
public class ConditionalIndex
ConditionalIndex is a MapIndex
implemenation that uses an associated filter to evaluate whether or not an entry should be indexed. An entry's extracted value is only added to the index if the filter evaluates to true.
Field Summary |
---|
Fields inherited from class com.tangosol.util.SimpleMapIndex |
---|
m_comparator, m_extractor, m_fOrdered, m_fSplitCollection, m_mapForward, m_mapInverse |
Fields inherited from interface com.tangosol.util.MapIndex |
---|
NO_VALUE |
Constructor Summary | |
---|---|
ConditionalIndex(Filter filter, ValueExtractor extractor, boolean fOrdered, Comparator comparator, boolean fForwardIndex) Construct a ConditionalIndex. |
Method Summary | |
---|---|
protected void |
deleteInternal(Map.Entry entry) Update this index in response to a remove operation on a cache. |
boolean |
equals(Object o) Compares the specified object with this index for equality. |
protected boolean |
evaluateEntry(Map.Entry entry) Evaluate the given entry using this index's filter. |
Object |
get(Object oKey) Using the index information if possible, get the value associated with the specified key. This is expected to be more efficient than using the ValueExtractor against an object containing the value, because the index should already have the necessary information at hand. |
Filter |
getFilter() Get the associated filter. |
protected Map.Entry |
getForwardEntry(Object oKey) Get the forward index entry associated with the specified key. |
protected void |
insertInternal(Map.Entry entry) Update this index in response to a insert operation on a cache. |
protected Map |
instantiateForwardIndex() Instantiate the forward index. |
boolean |
isForwardIndexSupported() Determine whether or not this ConditionalIndex supports a forward index. |
boolean |
isPartial() Determine if indexed information for any entry in the indexed Map has been excluded from this index. This information is used for IndexAwareFilter implementations to determine the most optimal way to apply the index. |
String |
toString() Returns a string representation of this ConditionalIndex. |
protected void |
updateInternal(Map.Entry entry) Update this index in response to an update operation on a cache. |
Methods inherited from class com.tangosol.util.SimpleMapIndex |
---|
addInverseCollectionMapping, addInverseMapping, addInverseMapping, delete, getComparator, getIndexContents, getValueExtractor, hashCode, initialize, insert, instantiateInverseIndex, instantiateSet, isOrdered, removeInverseMapping, removeInverseMapping, update |
Constructor Detail |
---|
public ConditionalIndex(Filter filter, ValueExtractor extractor, boolean fOrdered, Comparator comparator, boolean fForwardIndex)
filter
- the filter that is used to evaluate the entries of the resource map that is being indexedextractor
- the ValueExtractor
that is used to extract an indexed value from a resource map entryfOrdered
- true iff the contents of the indexed information should be ordered; false otherwisecomparator
- the Comparator object which imposes an ordering on entries in the index map; or null if the entries' values natural ordering should be usedfForwardIndex
- specifies whether or not this index supports a forward mapMethod Detail |
---|
public Object get(Object oKey)
get
in interface MapIndex
get
in class SimpleMapIndex
oKey
- the key that specifies the object to extract the value fromprotected Map.Entry getForwardEntry(Object oKey)
getForwardEntry
in class SimpleMapIndex
oKey
- the keyprotected Map instantiateForwardIndex()
SimpleMapIndex.getForwardEntry(Object)
method accordingly.instantiateForwardIndex
in class SimpleMapIndex
public boolean isPartial()
IndexAwareFilter
implementations to determine the most optimal way to apply the index.isPartial
in interface MapIndex
isPartial
in class SimpleMapIndex
public Filter getFilter()
public boolean isForwardIndexSupported()
protected boolean evaluateEntry(Map.Entry entry)
entry
- the entry to evaluateprotected void insertInternal(Map.Entry entry)
insertInternal
in class SimpleMapIndex
entry
- the entry representing the object being insertedprotected void updateInternal(Map.Entry entry)
updateInternal
in class SimpleMapIndex
entry
- the entry representing the object being updatedprotected void deleteInternal(Map.Entry entry)
deleteInternal
in class SimpleMapIndex
entry
- the entry representing the object being removedpublic String toString()
toString
in class SimpleMapIndex
public boolean equals(Object o)
equals
in class SimpleMapIndex
o
- object to be compared for equality with this MapIndex
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |