remove a writer lock entry for transaction tx on object obj
from the persistent storage.
429292
public void removeWriter(LockEntry writer)
	{
		try
		{
			removeWriterRemote(writer);
		}
		catch (Throwable t)
		{
			log.error("Cannot remove LockEntry", t);
		}
	}
327410
@Override
    protected void disconnectTransactions(StoredBlock oldBlock) throws PrunedException, BlockStoreException {
        checkState(lock.isHeldByCurrentThread());
        blockStore.beginDatabaseBatchWrite();
        try {
            StoredUndoableBlock undoBlock = blockStore.getUndoBlock(oldBlock.getHeader().getHash());
            if (undoBlock == null) throw new PrunedException(oldBlock.getHeader().getHash());
            TransactionOutputChanges txOutChanges = undoBlock.getTxOutChanges();
            for (UTXO out : txOutChanges.txOutsSpent)
                blockStore.addUnspentTransactionOutput(out);
            for (UTXO out : txOutChanges.txOutsCreated)
                blockStore.removeUnspentTransactionOutput(out);
        } catch (PrunedException e) {
            blockStore.abortDatabaseBatchWrite();
            throw e;
        } catch (BlockStoreException e) {
            blockStore.abortDatabaseBatchWrite();
            throw e;
        }
    }
568275
public final void lockForWrite(L locker) {
        if (!tryLockForWrite(locker)) {
            Result upgradeResult = lockForUpgrade_(locker);
            if (!tryLockForWrite(locker)) {
                lockForWriteQueued(locker, addWriteWaiter());
            }
            if (upgradeResult == Result.ACQUIRED) {
                // clear upgrade state bit to indicate automatic upgrade
                while (!clearUpgradeLock(mState)) {}
            } else {
                // undo automatic upgrade count increment
                mUpgradeCount--;
            }
        }
    }
1188428
public boolean remove(T transaction, I item) {
		return matrix.remove(transactionToIndex(transaction), itemToIndex(item));
	}
739491
public boolean hasReadLock(TransactionImpl tx, Object obj)
	{
		try
		{
			LockEntry lock = new LockEntry(new Identity(obj,getBroker()).toString(), tx.getGUID());
			boolean result = hasReadLockRemote(lock);			
			return result;
		}
		catch (Throwable t)
		{
			log.error("Cannot check read lock for object " + obj + " in transaction " + tx, t);
			return false;
		}
	}
267781
public boolean setWriter(TransactionImpl tx, Object obj)
	{
		try
		{
			LockEntry lock = new LockEntry(new Identity(obj,getBroker()).toString(),
					tx.getGUID(),
					System.currentTimeMillis(),
					LockStrategyFactory.getIsolationLevel(obj),
					LockEntry.LOCK_WRITE);

			setWriterRemote(lock);
			return true;
		}
		catch (Throwable t)
		{
			log.error("Cannot set LockEntry for object " + obj + " in transaction " + tx);
			return false;
		}
	}
1269628
def remove(self, value):
        """"""
        def remove_trans(pipe):
            # If we're caching, we'll need to synchronize before removing.
            if self.writeback:
                self._sync_helper(pipe)

            delete_count = pipe.lrem(self.key, 1, self._pickle(value))
            if delete_count == 0:
                raise ValueError

        self._transaction(remove_trans)
1332163
public boolean setWriter(TransactionImpl tx, Object obj)
    {
        checkTimedOutLocks();

        Identity oid = new Identity(obj, tx.getBroker());
        LockEntry writer = new LockEntry(oid.toString(),
                tx.getGUID(),
                System.currentTimeMillis(),
                LockStrategyFactory.getIsolationLevel(obj),
                LockEntry.LOCK_WRITE);
        String oidString = oid.toString();
        setWriterInternal(writer, oidString);
        return true;
    }
807063
private void performDeletion(final ClassDescriptor cld, final Object obj, final Identity oid, final boolean ignoreReferences) throws PersistenceBrokerException
    {
            // 1. delete dependend collections
            if (!ignoreReferences  && cld.getCollectionDescriptors().size() > 0)
            {
                deleteCollections(obj, cld.getCollectionDescriptors());
            }
            // 2. delete object from directly mapped table
            try
            {
                dbAccess.executeDelete(cld, obj); // use obj not oid to delete, BRJ
            }
            catch(OptimisticLockException e)
            {
                // ensure that the outdated object be removed from cache
                objectCache.remove(oid);
                throw e;
            }

            // 3. Add OID to the set of deleted objects
            deletedDuringTransaction.add(oid);

            // 4. delete dependend upon objects last to avoid FK violations
            if (cld.getObjectReferenceDescriptors().size() > 0)
            {
                deleteReferences(cld, obj, oid, ignoreReferences);
            }
            // remove obj from the object cache:
            objectCache.remove(oid);
    }
289397
private void removeEntry(EntryImpl<K, V> entry) {

    // Removes from bucket.
    EntryImpl<K, V> previous = entry._previous;
    EntryImpl<K, V> next = entry._next;
    if (previous != null) {
      previous._next = next;
      entry._previous = null;
    } else { // First in bucket.
      _entries[entry._index] = next;
    }
    if (next != null) {
      next._previous = previous;
      entry._next = null;
    } // Else do nothing, no last pointer.

    // Removes from collection.
    EntryImpl<K, V> before = entry._before;
    EntryImpl<K, V> after = entry._after;
    if (before != null) {
      before._after = after;
      entry._before = null;
    } else { // First in collection.
      _mapFirst = after;
    }
    if (after != null) {
      after._before = before;
    } else { // Last in collection.
      _mapLast = before;
    }

    // Clears value and key.
    entry._key = null;
    entry._value = null;

    // Recycles.
    entry._after = _poolFirst;
    _poolFirst = entry;

    // Updates size.
    _size--;
    sizeChanged();
  }
802139
def remove_lock(self):
        
        key = '%s_lock' % self.scheduler_key

        if self._lock_acquired:
            self.connection.delete(key)
1197131
public boolean remove(Token token,
                          Transaction transaction)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "remove",
                        new Object[] { token, transaction });

        Iterator iterator = iterator();
        boolean removed = false;
        synchronized (iterator) {
            synchronized (transaction.internalTransaction) {
                synchronized (this) {
                    try {
                        while (iterator.next(transaction) != token);
                        iterator.remove(transaction);
                        removed = true;
                    } catch (java.util.NoSuchElementException exception) {
                        // No FFDC code needed.
                    } // try.
                } // synchronized (this).
            } // synchronized (transaction.internalTransaction).
        } // synchronized (iterator).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "remove",
                       new Object[] { new Boolean(removed) });
        return removed;
    }
26600
public void removedLastSubscriber (DObject obj, boolean deathWish)
    {
        // if this object has a registered flush delay, don't can it just yet, just slip it onto
        // the flush queue
        Class<?> oclass = obj.getClass();
        for (Class<?> dclass : _delays.keySet()) {
            if (dclass.isAssignableFrom(oclass)) {
                long expire =  System.currentTimeMillis() + _delays.get(dclass).longValue();
                _flushes.put(obj.getOid(), new FlushRecord(obj, expire));
//                 Log.info("Flushing " + obj.getOid() + " at " + new java.util.Date(expire));
                return;
            }
        }

        // if we didn't find a delay registration, flush immediately
        flushObject(obj);
    }
237870
private void forgetTransaction(GlobalTransaction gtx, RpcManager rpcManager, CommandsFactory factory) {
      TxCompletionNotificationCommand cmd = factory.buildTxCompletionNotificationCommand(xid, gtx);
      rpcManager.sendToAll(cmd, DeliverOrder.NONE);
      perCacheTxTable.removeLocalTx(xid);
      globalTxTable.remove(cacheXid);
   }
347393
private boolean cleanLockedObjects( LockedObject lo,
                                        boolean temporary ) {

        if (lo.children == null) {
            if (lo.owner == null) {
                if (temporary) {
                    lo.removeTempLockedObject();
                } else {
                    lo.removeLockedObject();
                }

                return true;
            }
            return false;
        }
        boolean canDelete = true;
        int limit = lo.children.length;
        for (int i = 0; i < limit; i++) {
            if (!cleanLockedObjects(lo.children[i], temporary)) {
                canDelete = false;
            } else {

                // because the deleting shifts the array
                i--;
                limit--;
            }
        }
        if (canDelete) {
            if (lo.owner == null) {
                if (temporary) {
                    lo.removeTempLockedObject();
                } else {
                    lo.removeLockedObject();
                }
                return true;
            }
            return false;
        }
        return false;
    }
85577
public synchronized boolean checkWrite(TransactionImpl tx, Object obj)
    {
        if (log.isDebugEnabled()) log.debug("LM.checkWrite(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
        LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
        return lockStrategy.checkWrite(tx, obj);
    }
557326
private boolean cleanLockedObjects(ITransaction transaction,
            LockedObject lo, boolean temporary) {

        if (lo._children == null) {
            if (lo._owner == null) {
                if (temporary) {
                    lo.removeTempLockedObject();
                } else {
                    lo.removeLockedObject();
                }

                return true;
            } else {
                return false;
            }
        } else {
            boolean canDelete = true;
            int limit = lo._children.length;
            for (int i = 0; i < limit; i++) {
                if (!cleanLockedObjects(transaction, lo._children[i], temporary)) {
                    canDelete = false;
                } else {

                    // because the deleting shifts the array
                    i--;
                    limit--;
                }
            }
            if (canDelete) {
                if (lo._owner == null) {
                    if (temporary) {
                        lo.removeTempLockedObject();
                    } else {
                        lo.removeLockedObject();
                    }
                    return true;
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }
    }