@Override
    public ENTRY update(final ENTRY entry) throws CouldNotPerformException {
        if (entry == null) {
            throw new NotAvailableException("entry");
        }
        log("Update " + entry + "...");
        try {
            checkWriteAccess();
            lock();
            try {
                try {
                    // validate update
                    if (!entryMap.containsKey(entry.getId())) {
                        throw new InvalidStateException("Entry not registered!");
                    }
                    // perform update
                    sandbox.update(entry);
                    // check if the new message results in an update after consistency checks
                    final boolean changed = !isSandbox() && ((sandbox instanceof MockRegistrySandbox) || !get(entry).equals(sandbox.get(entry)));
                    pluginPool.beforeUpdate(entry);
                    entryMap.put(entry.getId(), entry);
                    finishTransaction();
                    pluginPool.afterUpdate(entry);
                    // test if the entry has changed at all by this update method
                    if (changed) {
                        notifySuccessfulTransaction();
                    }
                } finally {
                    syncSandbox();
                }
            } finally {
                unlock();
            }
        } catch (CouldNotPerformException ex) {
            throw new CouldNotPerformException("Could not update " + entry + " in " + this + "!", ex);
        }
        notifyObservers();
        return get(entry);
    }
@ Override public ENTRY update ( final ENTRY entry ) throws CouldNotPerformException { if ( entry == null ) { throw new NotAvailableException ( "entry" ) ; } log ( "Update " + entry + "..." ) ; try { checkWriteAccess ( ) ; lock ( ) ; try { try { if ( ! entryMap . containsKey ( entry . getId ( ) ) ) { throw new InvalidStateException ( "Entry not registered!" ) ; } sandbox . update ( entry ) ; final boolean changed = ! isSandbox ( ) && ( ( sandbox instanceof MockRegistrySandbox ) || ! get ( entry ) . equals ( sandbox . get ( entry ) ) ) ; pluginPool . beforeUpdate ( entry ) ; entryMap . put ( entry . getId ( ) , entry ) ; finishTransaction ( ) ; pluginPool . afterUpdate ( entry ) ; if ( changed ) { notifySuccessfulTransaction ( ) ; } } finally { syncSandbox ( ) ; } } finally { unlock ( ) ; } } catch ( CouldNotPerformException ex ) { throw new CouldNotPerformException ( "Could not update " + entry + " in " + this + "!" , ex ) ; } notifyObservers ( ) ; return get ( entry ) ; }
{@inheritDoc}

@param entry {@inheritDoc}

@return {@inheritDoc}

@throws CouldNotPerformException {@inheritDoc}