Class SliceInMemory<A>
java.lang.Object
org.aksw.commons.io.slice.SliceBase<A>
org.aksw.commons.io.slice.SliceInMemory<A>
- Type Parameters:
A-
- All Implemented Interfaces:
Slice<A>, SliceMetaDataBasic, org.aksw.commons.io.util.Sync
-
Field Summary
FieldsFields inherited from class SliceBase
arrayOps, hasDataCondition, readWriteLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEvictionGuard(com.google.common.collect.RangeSet<Long> range) Protect a set of ranges from eviction.static <A> SliceInMemory<A> protected SliceMetaDataBasicAn accessor which allows for 'claiming' a sub-range of this slice.voidsync()Methods inherited from class SliceBase
getArrayOps, getFailedRanges, getHasDataCondition, getLoadedRanges, getMaximumKnownSize, getMinimumKnownSize, getReadWriteLock, setMaximumKnownSize, setMinimumKnownSizeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Slice
computeFromMetaData, isComplete, mutateMetaData, readMetaDataMethods inherited from interface SliceMetaDataBasic
getGaps, getKnownSize, setKnownSize, updateMaximumKnownSize, updateMinimumKnownSize
-
Field Details
-
metaData
-
buffer
-
-
Constructor Details
-
SliceInMemory
-
-
Method Details
-
create
-
getMetaData
- Specified by:
getMetaDatain classSliceBase<A>
-
newSliceAccessor
Description copied from interface:SliceAn accessor which allows for 'claiming' a sub-range of this slice. The claimed range can be incrementally modified which may re-use already allocated resources (e.g. claimed pages) and thus improve performance. Sub-ranges of a slice can be loaded and iterated or inserted into. The sub-ranges can be modified dynamically. -
sync
- Throws:
IOException
-
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 no data in the range may get lost due to eviction. This method should not be used directly but via}.invalid @link
{@link SliceAccessor#addEvictionGuard(RangeSet))
-