Class SliceInMemoryCache<A>
java.lang.Object
org.apache.jena.sparql.service.enhancer.slice.impl.SliceBase<A>
org.apache.jena.sparql.service.enhancer.slice.impl.SliceInMemoryCache<A>
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Sync,HasArrayOps<A>,PageHelper,Slice<A>,SliceMetaDataBasic,SliceWithPages<A>
A slice implementation that starts to discard pages once there are too many.
-
Method Summary
Modifier and TypeMethodDescriptionaddEvictionGuard(com.google.common.collect.RangeSet<Long> ranges) Protect a set of ranges from eviction.voidclear()Reset this slice - removes all data and sets the size to unknownstatic <A> Slice<A>getPageForPageId(long pageId) longvoidsync()Methods inherited from class org.apache.jena.sparql.service.enhancer.slice.impl.SliceBase
getArrayOps, getFailedRanges, getHasDataCondition, getLoadedRanges, getMaximumKnownSize, getMinimumKnownSize, getReadWriteLock, setMaximumKnownSize, setMinimumKnownSizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.HasArrayOps
getArrayOpsMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.PageHelper
getIndexInPageForOffset, getPageIdForOffset, getPageOffsetForPageIdMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.Slice
computeFromMetaData, getHasDataCondition, getReadWriteLock, isComplete, mutateMetaData, readMetaDataMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.SliceMetaDataBasic
getFailedRanges, getGaps, getKnownSize, getLoadedRanges, getMaximumKnownSize, getMinimumKnownSize, setKnownSize, setMaximumKnownSize, setMinimumKnownSize, updateMaximumKnownSize, updateMinimumKnownSizeMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.SliceWithPages
newSliceAccessor
-
Method Details
-
create
-
sync
public void sync()- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
getPageSize
public long getPageSize()- Specified by:
getPageSizein interfacePageHelper- Specified by:
getPageSizein interfaceSliceWithPages<A>
-
getPageForPageId
- Specified by:
getPageForPageIdin interfaceSliceWithPages<A>
-
addEvictionGuard
Description copied from interface:SliceProtect a set of ranges from eviction. If the slice does make use of eviction then this method can return null. Otherwise, a disposable must be returned. As long as it is not disposed, the no data in the range may get lost due to eviction. This method should not be used directly but viaSliceAccessor.addEvictionGuard(com.google.common.collect.RangeSet<java.lang.Long>).- Specified by:
addEvictionGuardin interfaceSlice<A>
-
clear
public void clear()Description copied from interface:SliceReset this slice - removes all data and sets the size to unknown
-