|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.bigdata.btree.BigdataSet<E>
public class BigdataSet<E>
A SortedSet backed by a B+Tree.
Note: The BigdataMap has the same concurrency constraints as the
BTree - it is single-threaded for writes and allows concurrent
readers.
Note: The BigdataSet is actually flyweight wrapper around a
BigdataMap whose keys and values are both formed from the values
stored in this SortedSet.
Note: Both Set.equals(Object) and Set.hashCode() are VERY
expensive, but that is how they are defined.
| Field Summary | |
|---|---|
protected static String |
ERR_TOO_MANY
Text of the error message used when there are more than Integer.MAX_VALUE entries. |
| Constructor Summary | |
|---|---|
BigdataSet(IIndex ndx)
|
|
| Method Summary | |
|---|---|
boolean |
add(E key)
|
boolean |
addAll(Collection<? extends E> c)
|
void |
clear()
|
Comparator<? super E> |
comparator()
There is no means available to specify a Comparator for the
SortedSet. |
boolean |
contains(Object key)
|
boolean |
containsAll(Collection<?> c)
|
E |
first()
Note: This is written using an ITupleIterator in order to decode
the entry. |
SortedSet<E> |
headSet(E toKey)
|
boolean |
isEmpty()
|
Iterator<E> |
iterator()
|
E |
last()
Note: This is written using an ITupleIterator in order to decode
the entry. |
long |
rangeCount(boolean exactCount)
The #of non-deleted entries in the map. |
boolean |
remove(Object key)
|
boolean |
removeAll(Collection<?> c)
|
boolean |
retainAll(Collection<?> c)
|
int |
size()
The #of index entries. |
SortedSet<E> |
subSet(E fromKey,
E toKey)
|
SortedSet<E> |
tailSet(E fromKey)
|
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
equals, hashCode, toArray, toArray |
| Field Detail |
|---|
protected static final transient String ERR_TOO_MANY
Integer.MAX_VALUE entries.
| Constructor Detail |
|---|
public BigdataSet(IIndex ndx)
| Method Detail |
|---|
public boolean add(E key)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean remove(Object key)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public boolean contains(Object key)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public int size()
Integer.MAX_VALUE
entries then this method will report Integer.MAX_VALUE entries.
If the backing index supports delete markers then an index scan will be
performed in order to count the #of non-deleted index entries.
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public long rangeCount(boolean exactCount)
exactCount - When true the result will be an exact count,
which will require a full key-range scan if delete markers are
enabled for the index.
false and delete markers are being used, then this
will be an upper bound.IRangeQuery.rangeCount(byte[], byte[])public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface Set<E>iterator in class AbstractCollection<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface Set<E>containsAll in class AbstractCollection<E>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractSet<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface Set<E>retainAll in class AbstractCollection<E>public final Comparator<? super E> comparator()
Comparator for the
SortedSet. Application keys are first converted into
unsigned byte[] keys using the configured
ITupleSerializer for the backing B+Tree. The index order is
directly determined by those keys.
comparator in interface SortedSet<E>null.public E first()
ITupleIterator in order to decode
the entry.
first in interface SortedSet<E>public E last()
ITupleIterator in order to decode
the entry.
last in interface SortedSet<E>public SortedSet<E> headSet(E toKey)
headSet in interface SortedSet<E>
public SortedSet<E> subSet(E fromKey,
E toKey)
subSet in interface SortedSet<E>public SortedSet<E> tailSet(E fromKey)
tailSet in interface SortedSet<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||