java.lang.Object
org.apache.jena.tdb1.index.ext.ExtHash
- All Implemented Interfaces:
Iterable<Record>,org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,Index
Extensible hashing
http://en.wikipedia.org/wiki/Extendible_hashing
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExtHash(PlainFile dictionaryBackingFile, RecordFactory recordFactory, BlockMgr blockMgrHashBuckets) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a record - return true if an insertion was actually neededvoidcheck()Perform checks on this indexvoidclear()Clear the indexvoidclose()Close the index - can not be used again through this objectbooleanReturn whether the index contains the record or not.longcount()Explicitly count the items in the hash tablestatic ExtHashcreateMem(RecordFactory factory, int bucketSizeBytes) Testing version - in-memory but inefficient as it uses a copy-in/copy-out block manager as a RAM diskbooleanDelete a record.final intvoiddump()Find one record - and return the record actually in the index (may have a value part)Get the Record factory associated with this indexbooleanisEmpty()Answer whether the index is empty or not.iterator()Iterate over the whole indexlongsize()Return size if known else return -1 : does not count the persistent storagevoidsync()toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
Debugging
public static boolean Debugging -
Checking
public static boolean Checking -
Logging
public static boolean Logging
-
-
Constructor Details
-
ExtHash
public ExtHash(PlainFile dictionaryBackingFile, RecordFactory recordFactory, BlockMgr blockMgrHashBuckets)
-
-
Method Details
-
createMem
Testing version - in-memory but inefficient as it uses a copy-in/copy-out block manager as a RAM disk -
dictionarySize
public final int dictionarySize() -
contains
Description copied from interface:IndexReturn whether the index contains the record or not. -
find
Description copied from interface:IndexFind one record - and return the record actually in the index (may have a value part) -
add
Description copied from interface:IndexAdd a record - return true if an insertion was actually needed -
delete
Description copied from interface:IndexDelete a record. Return true if a record was actually removed -
getRecordFactory
Description copied from interface:IndexGet the Record factory associated with this index- Specified by:
getRecordFactoryin interfaceIndex
-
iterator
Description copied from interface:IndexIterate over the whole index -
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 -
size
public long size()Description copied from interface:IndexReturn size if known else return -1 : does not count the persistent storage -
count
public long count()Explicitly count the items in the hash table -
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 -
toString
-
dump
public void dump() -
check
public void check()Description copied from interface:IndexPerform checks on this index
-