/** * {@inheritDoc} */ @Override public void remove( PartitionTxn partitionTxn, K key, V value ) throws LdapException { try { if ( key == null ) { return; } org.apache.directory.mavibot.btree.Tuple<K, V> tuple = bt.delete( key, value ); // We decrement the counter only when the key was found if ( tuple != null ) { count--; } } catch ( Exception e ) { LOG.error( I18n.err( I18n.ERR_132, key, value, name ), e ); } }
/** * {@inheritDoc} */ @Override protected void doDeleteIdentity(String principalName) throws KrbException { try { Tuple<String, KrbIdentity> t = database.delete(principalName); if (t == null) { throw new KrbException("Not existing, identity = " + principalName); } } catch (IOException e) { throw new KrbException("Failed to delete the identity " + principalName); } }
/** * {@inheritDoc} */ @Override protected synchronized KrbIdentity doUpdateIdentity(KrbIdentity identity) throws KrbException { String p = identity.getPrincipalName(); try { if (!database.hasKey(p)) { throw new KrbException("No identity found with the principal " + p); } database.delete(p); return database.insert(p, identity); } catch (Exception e) { throw new KrbException("Failed to update the identity " + p); } }
Tuple<V, V> removedTuple = valueBtree.delete( removedValue );
Tuple<V, V> removedTuple = valueBtree.delete( removedValue );