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.void
clear()
Reset this slice - removes all data and sets the size to unknownstatic <A> Slice<A>
getPageForPageId
(long pageId) long
void
sync()
Methods inherited from class org.apache.jena.sparql.service.enhancer.slice.impl.SliceBase
getArrayOps, getFailedRanges, getHasDataCondition, getLoadedRanges, getMaximumKnownSize, getMinimumKnownSize, getReadWriteLock, setMaximumKnownSize, setMinimumKnownSize
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.HasArrayOps
getArrayOps
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.PageHelper
getIndexInPageForOffset, getPageIdForOffset, getPageOffsetForPageId
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.Slice
computeFromMetaData, getHasDataCondition, getReadWriteLock, isComplete, mutateMetaData, readMetaData
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.SliceMetaDataBasic
getFailedRanges, getGaps, getKnownSize, getLoadedRanges, getMaximumKnownSize, getMinimumKnownSize, setKnownSize, setMaximumKnownSize, setMinimumKnownSize, updateMaximumKnownSize, updateMinimumKnownSize
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.api.SliceWithPages
newSliceAccessor
-
Method Details
-
create
-
sync
public void sync()- Specified by:
sync
in interfaceorg.apache.jena.atlas.lib.Sync
-
getPageSize
public long getPageSize()- Specified by:
getPageSize
in interfacePageHelper
- Specified by:
getPageSize
in interfaceSliceWithPages<A>
-
getPageForPageId
- Specified by:
getPageForPageId
in interfaceSliceWithPages<A>
-
addEvictionGuard
Description copied from interface:Slice
Protect 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:
addEvictionGuard
in interfaceSlice<A>
-
clear
public void clear()Description copied from interface:Slice
Reset this slice - removes all data and sets the size to unknown
-