O
- The generic type of the object associated with the key-value pair.public class DefaultDuplicateRemover<O> extends Object implements IDuplicateRemover<O>
null
object reference
may be used to detect duplicates without requiring the comparison of the
byte[] values.
When duplicates are eliminated, KVOC
s identified as duplicates are
arranged into a linked list.
Modifier and Type | Field and Description |
---|---|
static IDuplicateRemover |
KEY_REF_VAL
Instance verifies the same unsigned byte[] key and will accept the same
non-
null object reference as indicating the same value. |
static IDuplicateRemover |
KEY_VAL
Instance verifies the same unsigned byte[] key and the same byte[]
value.,
|
Constructor and Description |
---|
DefaultDuplicateRemover(boolean testRefs) |
Modifier and Type | Method and Description |
---|---|
KVO<O>[] |
filter(KVO<O>[] src)
Accepts a dense array of key-value tuples and returns a dense array of
key-value tuples in which duplicates have been eliminated.
|
protected boolean |
filterDuplicate(KVO<O> prior,
KVO<O> other)
Return
true if the other instance is a duplicate and
may be dropped. |
public static final transient IDuplicateRemover KEY_VAL
public static final transient IDuplicateRemover KEY_REF_VAL
null
object reference as indicating the same value. If
the object reference is null
then it will compare the byte[]
values.public DefaultDuplicateRemover(boolean testRefs)
testRefs
- When true
, KVO
s having the same key
and the same non-null
object reference will be
filtered without testing the byte[] values for equality.public KVO<O>[] filter(KVO<O>[] src)
IDuplicateRemover
Implementations MUST be thread-safe.
Implementations MUST test for KVOList
and obey its contract (this
ensures that we can map KVO.done()
over the eliminated duplicates
once the original has been written successfully onto the database).
filter
in interface IDuplicateRemover<O>
src
- A sorted array of key-value tuples.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.