Package org.apache.jena.dboe.index
Class RangeIndexWrapper
- java.lang.Object
-
- org.apache.jena.dboe.index.RangeIndexWrapper
-
- All Implemented Interfaces:
java.lang.Iterable<Record>,org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,Index,RangeIndex
- Direct Known Subclasses:
RangeIndexLogger
public class RangeIndexWrapper extends java.lang.Object implements RangeIndex
-
-
Constructor Summary
Constructors Constructor Description RangeIndexWrapper(RangeIndex rIdx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck()Perform checks on this indexvoidclear()Clear the indexvoidclose()Close the index - can not be used again through this objectbooleancontains(Record record)Return whether the index contains the record or not.booleandelete(Record record)Delete a record - Return true if a record was actually removedRecordfind(Record record)Find one record - and return the record actually in the index (may have a value part)RecordFactorygetRecordFactory()Get the Record factory associated with this indexRangeIndexgetWrapped()booleaninsert(Record record)Insert a record - return true if an insertion was actually neededbooleanisEmpty()Answer whether the index is empty or not.java.util.Iterator<Record>iterator()Iterate over the whole indexjava.util.Iterator<Record>iterator(Record minRec, Record maxRec)Return records between min (inclusive) and max (exclusive), based on the record keys<X> java.util.Iterator<X>iterator(Record minRec, Record maxRec, RecordMapper<X> mapper)RecordmaxKey()Return the record containing the greatest key - may or may not have the associated valueRecordminKey()Return the record containing the least key - may or may not have the associated valuelongsize()Return size if known else return -1 : does not count the persistent storagevoidsync()
-
-
-
Constructor Detail
-
RangeIndexWrapper
public RangeIndexWrapper(RangeIndex rIdx)
-
-
Method Detail
-
find
public Record find(Record record)
Description copied from interface:IndexFind one record - and return the record actually in the index (may have a value part)
-
contains
public boolean contains(Record record)
Description copied from interface:IndexReturn whether the index contains the record or not.
-
minKey
public Record minKey()
Description copied from interface:RangeIndexReturn the record containing the least key - may or may not have the associated value- Specified by:
minKeyin interfaceRangeIndex
-
maxKey
public Record maxKey()
Description copied from interface:RangeIndexReturn the record containing the greatest key - may or may not have the associated value- Specified by:
maxKeyin interfaceRangeIndex
-
insert
public boolean insert(Record record)
Description copied from interface:IndexInsert a record - return true if an insertion was actually needed
-
delete
public boolean delete(Record record)
Description copied from interface:IndexDelete a record - Return true if a record was actually removed
-
iterator
public java.util.Iterator<Record> iterator()
Description copied from interface:IndexIterate over the whole index
-
iterator
public java.util.Iterator<Record> iterator(Record minRec, Record maxRec)
Description copied from interface:RangeIndexReturn records between min (inclusive) and max (exclusive), based on the record keys- Specified by:
iteratorin interfaceRangeIndex
-
iterator
public <X> java.util.Iterator<X> iterator(Record minRec, Record maxRec, RecordMapper<X> mapper)
- Specified by:
iteratorin interfaceRangeIndex
-
isEmpty
public boolean isEmpty()
Description copied from interface:IndexAnswer whether the index is empty or not. May return false for unknown or meaningless
-
clear
public void clear()
Description copied from interface:IndexClear the index
-
sync
public void sync()
- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
close
public void close()
Description copied from interface:IndexClose the index - can not be used again through this object
-
getWrapped
public RangeIndex getWrapped()
-
getRecordFactory
public RecordFactory getRecordFactory()
Description copied from interface:IndexGet the Record factory associated with this index- Specified by:
getRecordFactoryin interfaceIndex
-
check
public void check()
Description copied from interface:IndexPerform checks on this index
-
-