java.lang.Object
org.apache.jena.dboe.index.IndexMap
- All Implemented Interfaces:
Iterable<org.apache.jena.dboe.base.record.Record>,org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,Index
A simple implementation of
Index for testing-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck()Perform checks on this indexvoidclear()Clear the indexvoidclose()Close the index - can not be used again through this objectbooleancontains(org.apache.jena.dboe.base.record.Record record) Return whether the index contains the record or not.booleandelete(org.apache.jena.dboe.base.record.Record record) Delete a record - Return true if a record was actually removedorg.apache.jena.dboe.base.record.Recordfind(org.apache.jena.dboe.base.record.Record record) Find one record - and return the record actually in the index (may have a value part)org.apache.jena.dboe.base.record.RecordFactoryGet the Record factory associated with this indexbooleaninsert(org.apache.jena.dboe.base.record.Record record) Insert a record - return true if an insertion was actually neededbooleanisEmpty()Answer whether the index is empty or not.Iterator<org.apache.jena.dboe.base.record.Record>iterator()Iterate over the whole indexlongsize()Return size if known else return -1 : does not count the persistent storagevoidsync()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IndexMap
public IndexMap(org.apache.jena.dboe.base.record.RecordFactory recordFactory)
-
-
Method Details
-
find
public org.apache.jena.dboe.base.record.Record find(org.apache.jena.dboe.base.record.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(org.apache.jena.dboe.base.record.Record record) Description copied from interface:IndexReturn whether the index contains the record or not. -
insert
public boolean insert(org.apache.jena.dboe.base.record.Record record) Description copied from interface:IndexInsert a record - return true if an insertion was actually needed -
delete
public boolean delete(org.apache.jena.dboe.base.record.Record record) Description copied from interface:IndexDelete a record - Return true if a record was actually removed -
iterator
Description copied from interface:IndexIterate over the whole index -
getRecordFactory
public org.apache.jena.dboe.base.record.RecordFactory getRecordFactory()Description copied from interface:IndexGet the Record factory associated with this index- Specified by:
getRecordFactoryin interfaceIndex
-
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 -
check
public void check()Description copied from interface:IndexPerform checks on this index -
size
public long size()Description copied from interface:IndexReturn size if known else return -1 : does not count the persistent storage -
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
-