|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.storage.DefaultIndexImpl<KeyType,ValueType>
org.hypergraphdb.storage.DefaultBiIndexImpl<KeyType,ValueType>
public class DefaultBiIndexImpl<KeyType,ValueType>
| Field Summary |
|---|
| Fields inherited from class org.hypergraphdb.storage.DefaultIndexImpl |
|---|
DB_NAME_PREFIX |
| Constructor Summary | |
|---|---|
DefaultBiIndexImpl(java.lang.String indexName,
com.sleepycat.db.Environment env,
HGTransactionManager transactionManager,
ByteArrayConverter<KeyType> keyConverter,
ByteArrayConverter<ValueType> valueConverter,
java.util.Comparator<?> comparator)
|
|
| Method Summary | |
|---|---|
void |
close()
Close this index. |
long |
countKeys(ValueType value)
Return the number of keys pointing to the given values. |
HGRandomAccessResult<KeyType> |
findByValue(ValueType value)
Return a HGSearchResult over all keys whose
value is the value parameter. |
KeyType |
findFirstByValue(ValueType value)
Return a key whose value is the value parameter. |
boolean |
isOpen()
Return true if the index is currently opened and
false otherwise. |
void |
open()
Open the index for use. |
| Methods inherited from class org.hypergraphdb.storage.DefaultIndexImpl |
|---|
addEntry, count, count, find, findFirst, findGT, findGTE, findLT, findLTE, getComparator, getDatabaseName, getName, removeAllEntries, removeEntry, scanKeys, scanValues |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hypergraphdb.HGIndex |
|---|
addEntry, count, count, find, findFirst, removeAllEntries, removeEntry, scanKeys, scanValues |
| Constructor Detail |
|---|
public DefaultBiIndexImpl(java.lang.String indexName,
com.sleepycat.db.Environment env,
HGTransactionManager transactionManager,
ByteArrayConverter<KeyType> keyConverter,
ByteArrayConverter<ValueType> valueConverter,
java.util.Comparator<?> comparator)
| Method Detail |
|---|
public void open()
HGIndex
Open the index for use. Entries may be added to the index only when it
has been explicitly opened. To determine whether an index is currently
opened, use the isOpen method. Note that an index may be
temporarily opened by the HyperGraph querying mechanism.
open in interface HGIndex<KeyType,ValueType>open in class DefaultIndexImpl<KeyType,ValueType>public void close()
HGIndexClose this index. This method closes any run-time resources associated with the index, and invalidates it for use until reopened. It does not remove the index permanently from the database.
close in interface HGIndex<KeyType,ValueType>close in class DefaultIndexImpl<KeyType,ValueType>public boolean isOpen()
HGIndexReturn true if the index is currently opened and
false otherwise.
isOpen in interface HGIndex<KeyType,ValueType>isOpen in class DefaultIndexImpl<KeyType,ValueType>public HGRandomAccessResult<KeyType> findByValue(ValueType value)
HGBidirectionalIndexReturn a HGSearchResult over all keys whose
value is the value parameter.
findByValue in interface HGBidirectionalIndex<KeyType,ValueType>public KeyType findFirstByValue(ValueType value)
HGBidirectionalIndexReturn a key whose value is the value parameter. If
more than one index entry exists with that particular value, generally
the one that was added first will be returned, but this is not guarantueed.
findFirstByValue in interface HGBidirectionalIndex<KeyType,ValueType>public long countKeys(ValueType value)
HGBidirectionalIndexReturn the number of keys pointing to the given values. This operation must execute in constant time, regardless of the data in the index.
countKeys in interface HGBidirectionalIndex<KeyType,ValueType>value - The value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||