Class RangeBufferImpl<A>
java.lang.Object
org.apache.jena.sparql.service.enhancer.slice.impl.RangeBufferImpl<A>
- All Implemented Interfaces:
HasArrayOps<A>,ArrayReadable<A>,ArrayWritable<A>,BufferLike<A>,RangeBuffer<A>
-
Constructor Summary
ConstructorsConstructorDescriptionRangeBufferImpl(com.google.common.collect.RangeSet<Long> ranges, long offsetInRanges, Buffer<A> buffer) -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> RangeBufferImpl<A>static <A> RangeBufferImpl<A>get(long index) longBuffers with 'unlimited' capacity should return Long.MAX_VALUEcom.google.common.collect.RangeSet<Long>getCoveredRanges(com.google.common.collect.Range<Long> localRange) Return a set of contributions by this buffer for the given lookup range While this method does not expose which parts of the global range are covered, this method allows to check whether there are any gaps in the readThe offset within the range set where this buffer starts; may be null if the offset cannot be represented in a single value such as in a union of two buffers which have different offsetscom.google.common.collect.RangeSet<Long>A set of ranges from which reading is valid.voidintRead operation that blocks when attempting to access uncovered regions.toString()static <A> RangeBufferImpl<A>voidThe method that needs to be implemented; all other methods default-delegate to this one.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.impl.ArrayReadable
readIntoRawMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.impl.ArrayWritable
write, writeMethods inherited from interface org.apache.jena.sparql.service.enhancer.slice.impl.RangeBuffer
transferFrom, transferTo
-
Constructor Details
-
RangeBufferImpl
-
-
Method Details
-
getCoveredRanges
public com.google.common.collect.RangeSet<Long> getCoveredRanges(com.google.common.collect.Range<Long> localRange) Description copied from interface:RangeBufferReturn a set of contributions by this buffer for the given lookup range While this method does not expose which parts of the global range are covered, this method allows to check whether there are any gaps in the read- Specified by:
getCoveredRangesin interfaceRangeBuffer<A>
-
getBackingBuffer
- Specified by:
getBackingBufferin interfaceRangeBuffer<A>
-
create
public static <A> RangeBufferImpl<A> create(com.google.common.collect.RangeSet<Long> ranges, long offsetInRanges, Buffer<A> buffer) -
create
-
wrap
-
getRanges
Description copied from interface:RangeBufferA set of ranges from which reading is valid. The range set may be shared among several range buffers and may thus include ranges outside of the range formed by the buffer's offset and capacity- Specified by:
getRangesin interfaceRangeBuffer<A>
-
getCapacity
public long getCapacity()Description copied from interface:BufferLikeBuffers with 'unlimited' capacity should return Long.MAX_VALUE- Specified by:
getCapacityin interfaceBufferLike<A>
-
getOffsetInRanges
Description copied from interface:RangeBufferThe offset within the range set where this buffer starts; may be null if the offset cannot be represented in a single value such as in a union of two buffers which have different offsets- Specified by:
getOffsetInRangesin interfaceRangeBuffer<A>
-
getArrayOps
- Specified by:
getArrayOpsin interfaceHasArrayOps<A>
-
readInto
Read operation that blocks when attempting to access uncovered regions.- Specified by:
readIntoin interfaceArrayReadable<A>- Throws:
IOException
-
get
- Specified by:
getin interfaceArrayReadable<A>
-
write
public void write(long offsetInBuffer, A arrayWithItemsOfTypeT, int arrOffset, int arrLength) throws IOException Description copied from interface:ArrayWritableThe method that needs to be implemented; all other methods default-delegate to this one.- Specified by:
writein interfaceArrayWritable<A>- Throws:
IOException
-
put
- Specified by:
putin interfaceArrayWritable<A>
-
toString
-