/** * Deletes a entry from the master table at an index specified by id. * * @param id the BigInteger id of the entry to delete * @return the Attributes of the deleted entry * @throws NamingException if there is a write error on the underlying Db */ public Attributes delete( BigInteger id ) throws NamingException { return ( Attributes ) super.remove( id ); }
return remove( key, value );
/** * {@inheritDoc} */ public synchronized void drop( PartitionTxn partitionTxn, K attrVal, String id ) throws LdapException { // The pair to be removed must exists if ( forward.has( partitionTxn, attrVal, id ) ) { forward.remove( partitionTxn, attrVal, id ); if ( withReverse ) { reverse.remove( partitionTxn, id, attrVal ); } } }
/** * @see org.apache.directory.server.core.partition.impl.btree.Index#drop(java.lang.Object, * java.math.BigInteger) */ public synchronized void drop( Object attrVal, BigInteger id ) throws NamingException { forward.remove( getNormalized( attrVal ), id ); reverse.remove( id, getNormalized( attrVal ) ); }
/** * @see Index#drop( * javax.naming.directory.Attribute, java.math.BigInteger) */ public void drop( Attribute attr, BigInteger id ) throws NamingException { // Can efficiently batch remove from the reverse table NamingEnumeration values = attr.getAll(); // If their are no values in attr this is a request to drop all if ( !values.hasMore() ) { drop( id ); return; } reverse.remove( id, values ); // Have no choice but to remove values individually from forward table values = attr.getAll(); while ( values.hasMore() ) { forward.remove( values.next(), id ); } }
/** * delete the current message * used for internal log cleanup ONLY */ protected void delete() { try { if ( qualifiedEvtMsg != null ) { journal.remove( partitionTxn, qualifiedEvtMsg.getEntry().get( SchemaConstants.ENTRY_CSN_AT ).getString() ); } } catch ( Exception e ) { } }
/** * {@inheritDoc} */ public boolean next() throws LdapException, CursorException { while ( tupleCursor.next() ) { Tuple<String, ReplicaEventMessage> tuple = tupleCursor.get(); String csn = tuple.getKey(); ReplicaEventMessage message = tuple.getValue(); if ( skipQualifying ) { qualifiedEvtMsg = message; return true; } boolean qualified = isQualified( csn, message ); if ( qualified ) { qualifiedEvtMsg = message; return true; } else { journal.remove( partitionTxn, csn ); } } qualifiedEvtMsg = null; return false; }