/** * Added to check that we actually switch from one data structure to the * B+Tree structure on disk for duplicates that go beyond the threshold. */ boolean isKeyUsingBTree( K key ) throws Exception { if ( key == null ) { throw new IllegalArgumentException( "key is null" ); } if ( !allowsDuplicates ) { return false; } DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) ); if ( values.isBTreeRedirect() ) { return true; } return false; }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") public boolean has( PartitionTxn transaction, K key, V value ) throws LdapException { if ( key == null ) { return false; } try { if ( !allowsDuplicates ) { V stored = bt.find( key ); return null != stored && stored.equals( value ); } DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) ); if ( values.isArrayTree() ) { return values.getArrayTree().find( value ) != null; } return getBTree( values.getBTreeRedirect() ).find( value ) != null; } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } }
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
returnedTuple.setValue( table.getDupsContainer( ( byte[] ) jdbmTuple.getValue() ) );
returnedTuple.setValue( table.getDupsContainer( ( byte[] ) jdbmTuple.getValue() ) );