Package com.j_spaces.core.cache
Class ExtendedIndexHandler<K>
java.lang.Object
com.j_spaces.core.cache.ExtendedIndexHandler<K>
- All Implemented Interfaces:
IExtendedEntriesIndex<K,,IEntryCacheInfo> IExtendedIndex<K,,IEntryCacheInfo> IExtendedIndexScanPositioner<K,IEntryCacheInfo>
public class ExtendedIndexHandler<K>
extends Object
implements IExtendedEntriesIndex<K,IEntryCacheInfo>
Handles data manipulation of space extended index
- Since:
- 8.0
- Version:
- 1.0
- Author:
- Yechiel Fefer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionestablishScan(K startPos, short relation, K endPos, boolean endPosInclusive) establish a scan according to the relation given and startPos : the start-scan object , null means scan all values.establishScan(K startPos, short relation, K endPos, boolean endPosInclusive, boolean ordered) establish a scan according to the relation given and startPos : the start-scan object , null means scan all values.establishScanOrderedLimited(int limit, boolean isAsc) getIndexEntries(K indexValue) getMax()getMin()insertEntryIndexedField(IEntryCacheInfo pEntry, K fieldValue, TypeData pType, boolean alreadyCloned) insert a value for this key- if key already exist insert into the SL of same valuesvoidonRemove(IEntryCacheInfo eci) voidonUpdate(IEntryCacheInfo eci) voidintvoidremoveEntryIndexedField(IEntryHolder eh, Object fieldValue, IEntryCacheInfo pEntry, IObjectInfo oi) remove entry indexed field from cache.
-
Constructor Details
-
ExtendedIndexHandler
-
-
Method Details
-
getOrderedStore
- Specified by:
getOrderedStorein interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
getNonUniqueEntriesStore
- Specified by:
getNonUniqueEntriesStorein interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
getUniqueEntriesStore
- Specified by:
getUniqueEntriesStorein interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
getIndexEntries
- Specified by:
getIndexEntriesin interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
insertEntryIndexedField
public IObjectInfo insertEntryIndexedField(IEntryCacheInfo pEntry, K fieldValue, TypeData pType, boolean alreadyCloned) insert a value for this key- if key already exist insert into the SL of same values- Specified by:
insertEntryIndexedFieldin interfaceIExtendedIndex<K,IEntryCacheInfo> - Returns:
- the index backref
-
removeEntryIndexedField
public void removeEntryIndexedField(IEntryHolder eh, Object fieldValue, IEntryCacheInfo pEntry, IObjectInfo oi) remove entry indexed field from cache.- Specified by:
removeEntryIndexedFieldin interfaceIExtendedIndex<K,IEntryCacheInfo>
-
onUpdate
- Specified by:
onUpdatein interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
onUpdateEnd
- Specified by:
onUpdateEndin interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
onRemove
- Specified by:
onRemovein interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
reapExpired
public int reapExpired()- Specified by:
reapExpiredin interfaceIExtendedEntriesIndex<K,IEntryCacheInfo>
-
establishScan
public IScanListIterator<IEntryCacheInfo> establishScan(K startPos, short relation, K endPos, boolean endPosInclusive) establish a scan according to the relation given and startPos : the start-scan object , null means scan all values. The relation is from com.j_spaces.client.TemplateMatchCodes: LT, LE, GT, GE (other codes are not relevant) endPos- key up to (or null if no limit in index) endPosInclusive : is the endPos up to (or down to) and including ? returns an ExtendedIndexIterator object which enables scanning the ordered index, Null if no relevant elements to scan- Specified by:
establishScanin interfaceIExtendedIndexScanPositioner<K,IEntryCacheInfo>
-
establishScan
public IScanListIterator<IEntryCacheInfo> establishScan(K startPos, short relation, K endPos, boolean endPosInclusive, boolean ordered) establish a scan according to the relation given and startPos : the start-scan object , null means scan all values. The relation is from com.j_spaces.client.TemplateMatchCodes: LT, LE, GT, GE (other codes are not relevant) endPos- key up to (or null if no limit in index) endPosInclusive : is the endPos up to (or down to) and including ? ordered - according to the condition. GT, GE ==> ascending, LT, LE =====> descending. returns an IOrderedIndexScan object which enables scanning the ordered index, Null if no relevant elements to scan- Specified by:
establishScanin interfaceIExtendedIndexScanPositioner<K,IEntryCacheInfo>
-
establishScanOrderedLimited
-
getMin
-
getMinValue
-
getMax
-
getMaxValue
-