private boolean insertDupIntoBTree( BTree tree, Object value ) throws LdapNamingException { try { Object replaced = tree.insert( value, EMPTY_BYTES, true ); return null == replaced; } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failed to insert dup into BTree", ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
throw new LdapNamingException( "Encountered name based id of " + value + " which was not found in the OID registry" , ResultCodeEnum.OTHER );
BTreeEnumeration( BTree tree ) throws NamingException { try { browser = tree.browse(); prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
private boolean removeDupFromBTree( BTree tree, Object value ) throws LdapNamingException { try { Object removed = null; if ( tree.find( value ) != null ) { removed = tree.remove( value ); } return null != removed; } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failed to remove dup from BTree", ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( "Encountered name based id of " + value + " which was not found in the OID registry" , ResultCodeEnum.OTHER );
BTreeTupleEnumeration( BTree tree, Object key ) throws NamingException { this.key = key; stepForward = true; try { browser = tree.browse(); prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
public Object next() throws NamingException { if ( ! success ) { throw new NoSuchElementException(); } Object next = jdbmTuple.getKey(); try { prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } return next; }
throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
private BTree convertToBTree( TreeSet set ) throws NamingException { try { BTree tree = BTree.createInstance( recMan, comparator.getValueComparator() ); for ( Iterator ii = set.iterator(); ii.hasNext(); /**/ ) { tree.insert( ii.next(), EMPTY_BYTES, true ); } return tree; } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failed to convert TreeSet values to BTree", ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
BTreeIterator( BTree tree, boolean doAscending ) throws NamingException { this.doAscending = doAscending; try { if ( doAscending ) { browser = tree.browse(); } else { browser = tree.browse( null ); } prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( farthestDst + " ancestor is a referral for modifyDn on " + newName + " so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS ); throw new LdapNamingException( newName + " exists and is a referral for modifyDn destination so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS ); throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
BTree getBTree( BTreeRedirect redirect ) throws NamingException { if ( duplicateBtrees.containsKey( redirect.getRecId() ) ) { return ( BTree ) duplicateBtrees.get( redirect.getRecId() ); } try { BTree tree = BTree.load( recMan, redirect.getRecId().longValue() ); duplicateBtrees.put( redirect.getRecId(), tree ); return tree; } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failed to load btree", ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }
throw new LdapNamingException( farthestDst + " ancestor is a referral for modifyDn on " + newName + " so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS ); throw new LdapNamingException( newName + " exists and is a referral for modifyDn destination so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS ); throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
public Object next() throws NamingException { if ( ! success ) { throw new NoSuchElementException(); } tuple.setKey( key ); tuple.setValue( jdbmTuple.getKey() ); try { prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } return tuple; }
throw new LdapNamingException( "Undefined value for " + Context.REFERRAL + " key: " + refval, ResultCodeEnum.OTHER );
private Object firstKey ( BTree tree ) throws NamingException { jdbm.helper.Tuple tuple = new jdbm.helper.Tuple(); boolean success = false; try { success = tree.browse().getNext( tuple ); if ( success ) { return tuple.getKey(); } else { return null; } } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "IO failure while acessing btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }