Fill a mutation that will release the locks. This may be used from a
separate recipe to release multiple locks.

@param m
974850
public void fillReleaseMutation(MutationBatch m, boolean excludeCurrentLock) {
        // Add the deletes to the end of the mutation
        ColumnListMutation<C> row = m.withRow(columnFamily, key);
        for (C c : locksToDelete) {
            row.deleteColumn(c);
        }
        if (!excludeCurrentLock && lockColumn != null) 
            row.deleteColumn(lockColumn);
        locksToDelete.clear();
        lockColumn = null;
    }
1217495
@Override
  public <N,V> MutationResult insert(final K key, final String cf, final HColumn<N,V> c) {
    addInsertion(key, cf, c);
    return execute();
  }
1021010
@Override
  public <N,V> Mutator<K> addInsertion(K key, String cf, HColumn<N,V> c) {
    getPendingMutations().addInsertion(key, Arrays.asList(cf),
        ((HColumnImpl<N, V>) c).toThrift());
    return this;
  }
610974
private void primUpdateMembers(boolean renewLock) throws GroupsException {
        getLockableGroupService().updateGroupMembers(this, renewLock);
        clearPendingUpdates();
        this.invalidateInParentGroupsCache(Collections.singleton((IGroupMember) this));
    }
1312365
private MetaMethod specialCasedOverrideForCreate(final Method m) {
        return new MetaMethod() {

            @Override
            public int getModifiers() {
                return m.getModifiers();
            }

            @Override
            public String getName() {
                return m.getName();
            }

            @Override
            public Class<?> getReturnType() {
                return m.getReturnType();
            }

            @Override
            public CachedClass getDeclaringClass() {
                return ReflectionCache.getCachedClass(m.getDeclaringClass());
            }

            @Override
            @SuppressWarnings("unchecked")
            public Object invoke(Object object, final Object[] arguments) {
                return Observable.create(new GroovyCreateWrapper((Closure) arguments[0]));
            }

            @Override
            public CachedClass[] getParameterTypes() {
                if (parameterTypes == null) {
                    getParametersTypes0();
                }

                return parameterTypes;
            }

            private synchronized void getParametersTypes0() {
                if (parameterTypes != null)
                    return;

                Class [] npt = nativeParamTypes == null ? getPT() : nativeParamTypes;

                CachedClass[] pt = new CachedClass [npt.length];
                for (int i = 0; i != npt.length; ++i) {
                    if (Function.class.isAssignableFrom(npt[i])) {
                        // function type to be replaced by closure
                        pt[i] = ReflectionCache.getCachedClass(Closure.class);
                    } else {
                        // non-function type
                        pt[i] = ReflectionCache.getCachedClass(npt[i]);
                    }
                }

                nativeParamTypes = npt;
                setParametersTypes(pt);
            }

            @Override
            protected Class[] getPT() {
                return m.getParameterTypes();
            }
        };
    }
902640
public ListenableFuture<OperationResult<Void>> execute(final MutationBatch m) throws WalException {
        final WriteAheadEntry walEntry = wal.createEntry();
        walEntry.writeMutation(m);
        return executeWalEntry(walEntry, m);
    }
767215
@Override
  public void putAll(Map<? extends String, ? extends List<String>> m) {
    getMap().putAll(m);
  }
295609
void lockForHandlingWork() {
        synchronized(m_lock) {
            assert m_running == false;
            m_running = true;
            m_readyOps = 0;
            m_readyOps = m_selectionKey.readyOps();      // runnable.run() doesn't accept parameters
        }
    }
702806
public void setM(double m)
    {
        if(m < 0 || Double.isInfinite(m) || Double.isNaN(m))
            throw new ArithmeticException("The minimum count must be a non negative number");
        this.m = m;
    }
1125963
private void upgradeLockIfNeeded()
    {
        // using clone to avoid ConcurentModificationException
        Iterator iter = ((List) mvOrderOfIds.clone()).iterator();
        TransactionImpl tx = getTransaction();
        ObjectEnvelope mod;
        while(iter.hasNext())
        {
            mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
            // ignore transient objects
            if(!mod.getModificationState().isTransient())
            {
                /*
                now we check if all modified objects has a write lock. On insert of new
                objects we don't need a write lock.
                */
                if(!mod.needsInsert())
                {
                    if((mod.needsDelete() || mod.needsUpdate()
                            || mod.hasChanged(tx.getBroker())))
                    {
                        needsCommit = true;
                        // mark object dirty
                        mod.setModificationState(mod.getModificationState().markDirty());
                        ClassDescriptor cld = mod.getClassDescriptor();
                        // if the object isn't already locked, we will do it now
                        if(!mod.isWriteLocked())
                        {
                            tx.doSingleLock(cld, mod.getObject(), mod.getIdentity(), Transaction.WRITE);
                        }
                    }
                }
                else
                {
                    needsCommit = true;
                }
            }
        }
    }
1025838
public void fillMutationBatch(ColumnListMutation<ByteBuffer> clm, Object entity) throws IllegalArgumentException, IllegalAccessException {
        List<?> list = (List<?>) containerField.get(entity);
        if (list != null) {
            for (Object element : list) {
                fillColumnMutation(clm, element);
            }
        }
    }
814389
@Override
    public void putAll(Map<? extends K, ? extends List<V>> m) {
        listMap.putAll(m);
    }
45991
private void writeMutations(ByteBuffer key, List<Mutation> mutations) throws IOException
    {
        try
        {
            writer.write(key, mutations);
        }
        catch (InterruptedException e)
        {
            throw new IOException(e);
        }
    }
335426
def addMethod(self, m):
        
        if m.nargs == -1:
            m.nargs = len([a for a in marshal.genCompleteTypes(m.sigIn)])
            m.nret = len([a for a in marshal.genCompleteTypes(m.sigOut)])
        self.methods[m.name] = m
        self._xml = None
1094988
final void putMapEntries(Map<? extends K, ? extends V> m, boolean evict) {
        int s = m.size();
        if (s > 0) {
            if (table == null) { // pre-size
                float ft = ((float)s / loadFactor) + 1.0F;
                int t = ((ft < (float)MAXIMUM_CAPACITY) ?
                         (int)ft : MAXIMUM_CAPACITY);
                if (t > threshold)
                    threshold = tableSizeFor(t);
            }
            else if (s > threshold)
                resize();
            for (Map.Entry<? extends K, ? extends V> e : m.entrySet()) {
                K key = e.getKey();
                V value = e.getValue();
                putVal(hash(key), key, value, false, evict);
            }
        }
    }
962865
public void add(double m, Object pt, K key) {
		if (m == 0.0) return; //nothing to do
		if (count < capacity) { //shortcut
			//TODO should prefer add if var comes to zero
			GvmCluster<S,K> cluster = new GvmCluster<S,K>(this);
			clusters[additions] = cluster;
			cluster.set(m, pt);
			addPairs();
			cluster.key = keyer.addKey(cluster, key);
			count++;
			bound = count;
		} else {
			//identify cheapest merge
			GvmClusterPair<S,K> mergePair = pairs.peek();
			double mergeT = mergePair == null ? Double.MAX_VALUE : mergePair.value;
			//find cheapest addition
			GvmCluster<S,K> additionC = null;
			double additionT = Double.MAX_VALUE;
			for (int i = 0; i < clusters.length; i++) {
				GvmCluster<S,K> cluster = clusters[i];
				double t = cluster.test(m, pt);
				if (t < additionT) {
					additionC = cluster;
					additionT = t;
				}
			}
			if (additionT <= mergeT) {
				//chose addition
				additionC.add(m, pt);
				updatePairs(additionC);
				additionC.key = keyer.addKey(additionC, key);
			} else {
				//choose merge
				GvmCluster<S,K> c1 = mergePair.c1;
				GvmCluster<S,K> c2 = mergePair.c2;
				if (c1.m0 < c2.m0) {
					c1 = c2;
					c2 = mergePair.c1;
				}
				c1.key = keyer.mergeKeys(c1, c2);
				c1.add(c2);
				updatePairs(c1);
				c2.set(m, pt);
				updatePairs(c2);
				//TODO should this pass through a method on keyer?
				c2.key = null;
				c2.key = keyer.addKey(c2, key);
			}
		}
		additions++;
	}
583308
public void fillColumnMutation(ColumnListMutation<ByteBuffer> clm, Object entity) {
        try {
            ByteBuffer columnName = toColumnName(entity);
            ByteBuffer value      = valueMapper.toByteBuffer(entity);
            
            clm.putColumn(columnName, value);
        } catch(Exception e) {
            throw new PersistenceException("failed to fill mutation batch", e);
        }
    }