com.sleepycat.je.dbi
Class DupKeyData.PutNoOverwriteComparator

java.lang.Object
  extended by com.sleepycat.je.dbi.DupKeyData.PutNoOverwriteComparator
All Implemented Interfaces:
Comparator<byte[]>
Enclosing class:
DupKeyData

public static class DupKeyData.PutNoOverwriteComparator
extends Object
implements Comparator<byte[]>

Used to perform the putNoOverwrite operation. Only used to find the insertion position in the BIN, after the standard comparator is used to find the correct BIN for insertion. Because it compares part-one only, it prevents insertion of a duplicate for the main key given.


Constructor Summary
DupKeyData.PutNoOverwriteComparator(Comparator<byte[]> cmp)
           
 
Method Summary
 int compare(byte[] twoPartKey1, byte[] twoPartKey2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

DupKeyData.PutNoOverwriteComparator

public DupKeyData.PutNoOverwriteComparator(Comparator<byte[]> cmp)
Method Detail

compare

public int compare(byte[] twoPartKey1,
                   byte[] twoPartKey2)
Specified by:
compare in interface Comparator<byte[]>


Copyright (c) 2004-2012 Oracle. All rights reserved.