org.apache.hadoop.hbase.regionserver
Class KeyValueSkipListSet
java.lang.Object
org.apache.hadoop.hbase.regionserver.KeyValueSkipListSet
- All Implemented Interfaces:
- Iterable<KeyValue>, Collection<KeyValue>, NavigableSet<KeyValue>, Set<KeyValue>, SortedSet<KeyValue>
@InterfaceAudience.Private
public class KeyValueSkipListSet
- extends Object
- implements NavigableSet<KeyValue>
A Set of KeyValues implemented on top of a
ConcurrentSkipListMap. Works like a
ConcurrentSkipListSet in all but one regard:
An add will overwrite if already an entry for the added key. In other words,
where CSLS does "Adds the specified element to this set if it is not already
present.", this implementation "Adds the specified element to this set EVEN
if it is already present overwriting what was there previous". The call to
add returns true if no value in the backing map or false if there was an
entry with same key (though value may be different).
Otherwise,
has same attributes as ConcurrentSkipListSet: e.g. tolerant of concurrent
get and set and won't throw ConcurrentModificationException when iterating.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ceiling
public KeyValue ceiling(KeyValue e)
- Specified by:
ceiling in interface NavigableSet<KeyValue>
descendingIterator
public Iterator<KeyValue> descendingIterator()
- Specified by:
descendingIterator in interface NavigableSet<KeyValue>
descendingSet
public NavigableSet<KeyValue> descendingSet()
- Specified by:
descendingSet in interface NavigableSet<KeyValue>
floor
public KeyValue floor(KeyValue e)
- Specified by:
floor in interface NavigableSet<KeyValue>
headSet
public SortedSet<KeyValue> headSet(KeyValue toElement)
- Specified by:
headSet in interface NavigableSet<KeyValue>- Specified by:
headSet in interface SortedSet<KeyValue>
headSet
public NavigableSet<KeyValue> headSet(KeyValue toElement,
boolean inclusive)
- Specified by:
headSet in interface NavigableSet<KeyValue>
higher
public KeyValue higher(KeyValue e)
- Specified by:
higher in interface NavigableSet<KeyValue>
iterator
public Iterator<KeyValue> iterator()
- Specified by:
iterator in interface Iterable<KeyValue>- Specified by:
iterator in interface Collection<KeyValue>- Specified by:
iterator in interface NavigableSet<KeyValue>- Specified by:
iterator in interface Set<KeyValue>
lower
public KeyValue lower(KeyValue e)
- Specified by:
lower in interface NavigableSet<KeyValue>
pollFirst
public KeyValue pollFirst()
- Specified by:
pollFirst in interface NavigableSet<KeyValue>
pollLast
public KeyValue pollLast()
- Specified by:
pollLast in interface NavigableSet<KeyValue>
subSet
public SortedSet<KeyValue> subSet(KeyValue fromElement,
KeyValue toElement)
- Specified by:
subSet in interface NavigableSet<KeyValue>- Specified by:
subSet in interface SortedSet<KeyValue>
subSet
public NavigableSet<KeyValue> subSet(KeyValue fromElement,
boolean fromInclusive,
KeyValue toElement,
boolean toInclusive)
- Specified by:
subSet in interface NavigableSet<KeyValue>
tailSet
public SortedSet<KeyValue> tailSet(KeyValue fromElement)
- Specified by:
tailSet in interface NavigableSet<KeyValue>- Specified by:
tailSet in interface SortedSet<KeyValue>
tailSet
public NavigableSet<KeyValue> tailSet(KeyValue fromElement,
boolean inclusive)
- Specified by:
tailSet in interface NavigableSet<KeyValue>
comparator
public Comparator<? super KeyValue> comparator()
- Specified by:
comparator in interface SortedSet<KeyValue>
first
public KeyValue first()
- Specified by:
first in interface SortedSet<KeyValue>
last
public KeyValue last()
- Specified by:
last in interface SortedSet<KeyValue>
add
public boolean add(KeyValue e)
- Specified by:
add in interface Collection<KeyValue>- Specified by:
add in interface Set<KeyValue>
addAll
public boolean addAll(Collection<? extends KeyValue> c)
- Specified by:
addAll in interface Collection<KeyValue>- Specified by:
addAll in interface Set<KeyValue>
clear
public void clear()
- Specified by:
clear in interface Collection<KeyValue>- Specified by:
clear in interface Set<KeyValue>
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection<KeyValue>- Specified by:
contains in interface Set<KeyValue>
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll in interface Collection<KeyValue>- Specified by:
containsAll in interface Set<KeyValue>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection<KeyValue>- Specified by:
isEmpty in interface Set<KeyValue>
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection<KeyValue>- Specified by:
remove in interface Set<KeyValue>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll in interface Collection<KeyValue>- Specified by:
removeAll in interface Set<KeyValue>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll in interface Collection<KeyValue>- Specified by:
retainAll in interface Set<KeyValue>
get
public KeyValue get(KeyValue kv)
size
public int size()
- Specified by:
size in interface Collection<KeyValue>- Specified by:
size in interface Set<KeyValue>
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection<KeyValue>- Specified by:
toArray in interface Set<KeyValue>
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray in interface Collection<KeyValue>- Specified by:
toArray in interface Set<KeyValue>
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.