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
ConstructorDescriptionRangeBufferImpl
(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) long
Buffers 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.void
int
Read operation that blocks when attempting to access uncovered regions.toString()
static <A> RangeBufferImpl<A>
void
The 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, wait
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.impl.ArrayReadable
readIntoRaw
Methods inherited from interface org.apache.jena.sparql.service.enhancer.slice.impl.ArrayWritable
write, write
Methods 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:RangeBuffer
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 read- Specified by:
getCoveredRanges
in interfaceRangeBuffer<A>
-
getBackingBuffer
- Specified by:
getBackingBuffer
in 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:RangeBuffer
A 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:
getRanges
in interfaceRangeBuffer<A>
-
getCapacity
public long getCapacity()Description copied from interface:BufferLike
Buffers with 'unlimited' capacity should return Long.MAX_VALUE- Specified by:
getCapacity
in interfaceBufferLike<A>
-
getOffsetInRanges
Description copied from interface:RangeBuffer
The 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:
getOffsetInRanges
in interfaceRangeBuffer<A>
-
getArrayOps
- Specified by:
getArrayOps
in interfaceHasArrayOps<A>
-
readInto
Read operation that blocks when attempting to access uncovered regions.- Specified by:
readInto
in interfaceArrayReadable<A>
- Throws:
IOException
-
get
- Specified by:
get
in interfaceArrayReadable<A>
-
write
public void write(long offsetInBuffer, A arrayWithItemsOfTypeT, int arrOffset, int arrLength) throws IOException Description copied from interface:ArrayWritable
The method that needs to be implemented; all other methods default-delegate to this one.- Specified by:
write
in interfaceArrayWritable<A>
- Throws:
IOException
-
put
- Specified by:
put
in interfaceArrayWritable<A>
-
toString
-