public class BigdataSet<E> extends AbstractSet<E> implements SortedSet<E>
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.
Modifier and Type | Field and Description |
---|---|
protected static String |
ERR_TOO_MANY
Text of the error message used when there are more than
Integer.MAX_VALUE entries. |
Constructor and Description |
---|
BigdataSet(IIndex ndx) |
Modifier and Type | Method and Description |
---|---|
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) |
equals, hashCode
toArray, toArray, toString
protected static final transient String ERR_TOO_MANY
Integer.MAX_VALUE
entries.public BigdataSet(IIndex ndx)
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 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.public E last()
ITupleIterator
in order to decode
the entry.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.